diff --git a/database/migrations/2026_01_30_180000_create_corporate_cards_table.php b/database/migrations/2026_01_30_180000_create_corporate_cards_table.php new file mode 100644 index 0000000..32be027 --- /dev/null +++ b/database/migrations/2026_01_30_180000_create_corporate_cards_table.php @@ -0,0 +1,45 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->string('card_name', 100)->comment('카드명'); + $table->string('card_company', 50)->comment('카드사'); + $table->string('card_number', 30)->comment('카드번호'); + $table->enum('card_type', ['credit', 'debit'])->default('credit')->comment('카드종류'); + $table->tinyInteger('payment_day')->default(15)->comment('결제일'); + $table->decimal('credit_limit', 15, 2)->default(0)->comment('한도'); + $table->decimal('current_usage', 15, 2)->default(0)->comment('현재 사용액'); + $table->string('card_holder_name', 100)->nullable()->comment('이용자명(명의자)'); + $table->string('actual_user', 100)->nullable()->comment('실사용자'); + $table->string('expiry_date', 10)->nullable()->comment('유효기간 YY/MM'); + $table->string('cvc', 10)->nullable()->comment('CVC'); + $table->enum('status', ['active', 'inactive'])->default('active')->comment('상태'); + $table->text('memo')->nullable()->comment('메모'); + $table->timestamps(); + $table->softDeletes(); + + $table->index('tenant_id'); + $table->index('status'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('corporate_cards'); + } +};