diff --git a/database/migrations/2026_02_24_100000_create_business_card_requests_table.php b/database/migrations/2026_02_24_100000_create_business_card_requests_table.php new file mode 100644 index 0000000..1b2fff8 --- /dev/null +++ b/database/migrations/2026_02_24_100000_create_business_card_requests_table.php @@ -0,0 +1,42 @@ +id(); + $table->unsignedBigInteger('tenant_id')->comment('테넌트 ID'); + $table->unsignedBigInteger('user_id')->comment('신청자 ID'); + + // 명함 정보 + $table->string('name', 50)->comment('성함'); + $table->string('phone', 20)->comment('전화번호'); + $table->string('title', 50)->nullable()->comment('직함'); + $table->string('email', 100)->nullable()->comment('이메일'); + $table->unsignedInteger('quantity')->default(100)->comment('수량'); + $table->text('memo')->nullable()->comment('비고'); + + // 처리 상태 + $table->string('status', 20)->default('pending')->comment('상태: pending, processed'); + $table->unsignedBigInteger('processed_by')->nullable()->comment('처리자 ID'); + $table->timestamp('processed_at')->nullable()->comment('처리일시'); + $table->text('process_memo')->nullable()->comment('처리 메모'); + + $table->timestamps(); + + // 인덱스 + $table->index(['tenant_id', 'status']); + $table->index('user_id'); + }); + } + + public function down(): void + { + Schema::dropIfExists('business_card_requests'); + } +};