From 00470b7d30bc1df112a012e17db66b35394c9653 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:43:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EC=9D=BC=EC=9D=BC=EC=9E=90=EA=B8=88?= =?UTF-8?q?=EC=9D=BC=EB=B3=B4=20=EB=A7=88=EC=9D=B4=EA=B7=B8=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80=20(daily=5Ffund=5Ftrans?= =?UTF-8?q?actions,=20daily=5Ffund=5Fmemos)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.5 --- ...1_create_daily_fund_transactions_table.php | 36 +++++++++++++++++++ ...5_100002_create_daily_fund_memos_table.php | 28 +++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 database/migrations/2026_02_05_100001_create_daily_fund_transactions_table.php create mode 100644 database/migrations/2026_02_05_100002_create_daily_fund_memos_table.php diff --git a/database/migrations/2026_02_05_100001_create_daily_fund_transactions_table.php b/database/migrations/2026_02_05_100001_create_daily_fund_transactions_table.php new file mode 100644 index 0000000..5182169 --- /dev/null +++ b/database/migrations/2026_02_05_100001_create_daily_fund_transactions_table.php @@ -0,0 +1,36 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->date('transaction_date'); // 거래일 + $table->string('type', 20); // income, expense + $table->string('time', 10)->nullable(); // 시간 (HH:MM) + $table->unsignedBigInteger('account_id')->nullable(); // 계좌ID (corporate_cards 등과 연동 가능) + $table->string('account_name', 50)->nullable(); // 계좌/은행명 (간편 저장용) + $table->string('description', 200); // 적요 + $table->bigInteger('amount')->default(0); // 금액 + $table->string('category', 50)->nullable(); // 카테고리 + $table->string('note', 200)->nullable(); // 비고 + $table->timestamps(); + $table->softDeletes(); + $table->index(['tenant_id', 'transaction_date']); + $table->index(['tenant_id', 'type']); + }); + } + + public function down(): void + { + Schema::dropIfExists('daily_fund_transactions'); + } +}; diff --git a/database/migrations/2026_02_05_100002_create_daily_fund_memos_table.php b/database/migrations/2026_02_05_100002_create_daily_fund_memos_table.php new file mode 100644 index 0000000..36cf021 --- /dev/null +++ b/database/migrations/2026_02_05_100002_create_daily_fund_memos_table.php @@ -0,0 +1,28 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->date('memo_date')->comment('해당 날짜'); + $table->text('memo')->nullable(); + $table->string('author', 50)->nullable(); + $table->timestamps(); + $table->unique(['tenant_id', 'memo_date']); + }); + } + + public function down(): void + { + Schema::dropIfExists('daily_fund_memos'); + } +};