feat: 第二阶段核心业务模块(CRM/房务/护理/月子餐)

后端:
- 4个迁移文件新增23张业务表
- 23个Eloquent Model(含关联/类型转换/门店隔离)
- 20个Controller(含CRUD+业务操作: 合同审核/入住退房/护理异常处理等)
- 110+条API路由(crm/room/care/meal四大前缀)

前端:
- 4个API模块(crm.js/room.js/care.js/meal.js)
- 13个业务页面(线索/客户/合同/渠道/投诉/房型/房间/预定/护理档案/护理计划/护理记录/菜品/排餐)
This commit is contained in:
li
2026-03-13 20:18:29 +08:00
parent 11c177a432
commit 16bcd9bcf0
65 changed files with 4660 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Models\Crm;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class CustomerFamily extends Model
{
protected $table = 'customer_families';
protected $fillable = [
'customer_id', 'name', 'phone', 'relation', 'is_emergency',
];
protected function casts(): array
{
return [
'is_emergency' => 'boolean',
];
}
public function customer(): BelongsTo
{
return $this->belongsTo(Customer::class);
}
}