fix: HomeController contracts字段名修正(start_date→check_in_date)

This commit is contained in:
li
2026-03-14 21:14:38 +08:00
parent 1c1e44ade7
commit 4cdfeb034c
2 changed files with 21 additions and 23 deletions
@@ -56,7 +56,7 @@ class HomeController extends Controller
$contract = Contract::withoutGlobalScope('store') $contract = Contract::withoutGlobalScope('store')
->where('customer_id', $customer->id) ->where('customer_id', $customer->id)
->latest() ->latest()
->first(['id', 'contract_no', 'status', 'start_date', 'end_date', 'total_amount']); ->first(['id', 'contract_no', 'status', 'check_in_date', 'check_out_date', 'total_amount']);
// 月嫂信息(进行中派单) // 月嫂信息(进行中派单)
$nannyOrder = NannyOrder::withoutGlobalScope('store') $nannyOrder = NannyOrder::withoutGlobalScope('store')
@@ -75,7 +75,7 @@ class DemoClientSeeder extends Seeder
[6, 36.8, '℃'], [6, 36.8, '℃'],
[1, 36.4, '℃'], [1, 36.4, '℃'],
[2, 57.9, 'kg'], [2, 57.9, 'kg'],
[3, '110/70', 'mmHg'], [3, 110, 'mmHg'],
[5, 3.72, 'kg'], [5, 3.72, 'kg'],
]; ];
foreach ($metricData as $i => [$type, $value, $unit]) { foreach ($metricData as $i => [$type, $value, $unit]) {
@@ -84,7 +84,7 @@ class DemoClientSeeder extends Seeder
'metric_type' => $type, 'metric_type' => $type,
'value' => $value, 'value' => $value,
'unit' => $unit, 'unit' => $unit,
'measured_at' => now()->subDays((int)($i / 2))->setHour(8 + $i % 3), 'recorded_at' => now()->subDays((int)($i / 2))->setHour(8 + $i % 3),
'created_at' => now()->subDays((int)($i / 2)), 'created_at' => now()->subDays((int)($i / 2)),
]); ]);
} }
@@ -225,7 +225,6 @@ class DemoClientSeeder extends Seeder
// ── 9. 投诉反馈 ─────────────────────────────────────────────────────── // ── 9. 投诉反馈 ───────────────────────────────────────────────────────
DB::table('complaints')->insert([ DB::table('complaints')->insert([
[
'store_id' => $storeId, 'store_id' => $storeId,
'customer_id' => $customerId, 'customer_id' => $customerId,
'type' => 1, 'type' => 1,
@@ -235,8 +234,8 @@ class DemoClientSeeder extends Seeder
'handle_at' => now()->subDays(1), 'handle_at' => now()->subDays(1),
'created_at' => now()->subDays(2), 'created_at' => now()->subDays(2),
'updated_at' => now()->subDays(1), 'updated_at' => now()->subDays(1),
], ]);
[ DB::table('complaints')->insert([
'store_id' => $storeId, 'store_id' => $storeId,
'customer_id' => $customerId, 'customer_id' => $customerId,
'type' => 2, 'type' => 2,
@@ -244,7 +243,6 @@ class DemoClientSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now()->subHours(5), 'created_at' => now()->subHours(5),
'updated_at' => now()->subHours(5), 'updated_at' => now()->subHours(5),
],
]); ]);
$this->command->info("✅ Demo 客户创建成功!"); $this->command->info("✅ Demo 客户创建成功!");