From 2b5ac4c54d3aafd3532cac9f2e48dde0ac0c0604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 5 Feb 2026 07:44:09 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EB=B2=95=EC=9D=B8=EC=B9=B4=EB=93=9C=20?= =?UTF-8?q?=EA=B1=B0=EB=9E=98=EB=82=B4=EC=97=AD(card=5Ftransactions)=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.5 --- ..._100003_create_card_transactions_table.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 database/migrations/2026_02_05_100003_create_card_transactions_table.php diff --git a/database/migrations/2026_02_05_100003_create_card_transactions_table.php b/database/migrations/2026_02_05_100003_create_card_transactions_table.php new file mode 100644 index 0000000..9a55734 --- /dev/null +++ b/database/migrations/2026_02_05_100003_create_card_transactions_table.php @@ -0,0 +1,36 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->unsignedBigInteger('card_id')->nullable(); // corporate_cards.id + $table->date('transaction_date'); // 거래일 + $table->string('time', 10)->nullable(); // 시간 (HH:MM) + $table->string('merchant', 200); // 가맹점명 + $table->string('category', 50)->nullable(); // 카테고리 + $table->bigInteger('amount')->default(0); // 금액 (음수=취소) + $table->string('approval_no', 50)->nullable(); // 승인번호 + $table->string('status', 20)->default('approved'); // approved, cancelled + $table->text('memo')->nullable(); + $table->timestamps(); + $table->softDeletes(); + $table->index(['tenant_id', 'transaction_date']); + $table->index(['tenant_id', 'card_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('card_transactions'); + } +};