bigIncrements('id'); $table->unsignedBigInteger('tenant_id')->comment('멀티테넌시'); $table->string('file_path')->comment('저장경로'); $table->string('original_name')->comment('원본 파일명'); $table->string('file_name')->comment('저장 파일명 (난수)'); $table->string('file_name_old'); $table->integer('file_size')->nullable(); $table->string('mime_type', 50)->nullable(); $table->string('description')->nullable(); $table->unsignedBigInteger('fileable_id')->comment('Polymorphic - 연결된 모델의 PK'); $table->string('fileable_type', 100)->comment('Polymorphic - 연결된 모델 클래스명'); $table->unsignedBigInteger('uploaded_by')->nullable()->comment('업로더 사용자 ID'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('files'); } };