From 0bf56931fa75f475d6af51a13fd684ba23192632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 6 Mar 2026 21:39:02 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[database]=20=EA=B2=BD=EC=A1=B0?= =?UTF-8?q?=EC=82=AC=EB=B9=84=20=EA=B4=80=EB=A6=AC=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - condolence_expenses 테이블: 거래처 경조사비 관리대장 - 경조사일자, 지출일자, 거래처명, 내역, 구분(축의/부조) - 부조금(여부/지출방법/금액), 선물(여부/종류/금액), 총금액 --- ...20000_create_condolence_expenses_table.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 database/migrations/2026_03_06_220000_create_condolence_expenses_table.php diff --git a/database/migrations/2026_03_06_220000_create_condolence_expenses_table.php b/database/migrations/2026_03_06_220000_create_condolence_expenses_table.php new file mode 100644 index 0000000..365b8d0 --- /dev/null +++ b/database/migrations/2026_03_06_220000_create_condolence_expenses_table.php @@ -0,0 +1,41 @@ +id(); + $table->unsignedBigInteger('tenant_id')->index(); + $table->date('event_date')->nullable()->comment('경조사일자'); + $table->date('expense_date')->nullable()->comment('지출일자'); + $table->string('partner_name', 100)->comment('거래처명/대상자'); + $table->string('description', 200)->nullable()->comment('내역'); + $table->string('category', 20)->default('congratulation')->comment('구분: congratulation(축의), condolence(부조)'); + $table->boolean('has_cash')->default(false)->comment('부조금 여부'); + $table->string('cash_method', 30)->nullable()->comment('지출방법: cash, transfer, card'); + $table->integer('cash_amount')->default(0)->comment('부조금 금액'); + $table->boolean('has_gift')->default(false)->comment('선물 여부'); + $table->string('gift_type', 50)->nullable()->comment('선물 종류'); + $table->integer('gift_amount')->default(0)->comment('선물 금액'); + $table->integer('total_amount')->default(0)->comment('총금액'); + $table->json('options')->nullable(); + $table->text('memo')->nullable()->comment('비고'); + $table->unsignedBigInteger('created_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->index(['tenant_id', 'event_date']); + $table->index(['tenant_id', 'category']); + }); + } + + public function down(): void + { + Schema::dropIfExists('condolence_expenses'); + } +};