[FEAT] 實作公共事業費逾期提醒、租戶自訂通知設定及發送測試信功能
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 56s

This commit is contained in:
2026-03-05 16:01:00 +08:00
parent 016366407c
commit 07b7d9b327
15 changed files with 519 additions and 44 deletions

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('utility_fees', function (Blueprint $table) {
// 1. 將費用日期改為可為空 (繳費日期)
$table->date('transaction_date')->nullable()->change();
// 2. 新增繳費期限
$table->date('due_date')->nullable()->after('transaction_date')->comment('繳費期限');
// 3. 新增繳費狀態
$table->enum('payment_status', ['pending', 'paid', 'overdue'])
->default('pending')
->after('amount')
->comment('繳費狀態');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('utility_fees', function (Blueprint $table) {
$table->date('transaction_date')->nullable(false)->change();
$table->dropColumn(['due_date', 'payment_status']);
});
}
};