Files
LQ bcf54c2727 初始化
缺陷:主题配色需要优化整体的同风格
2026-08-14 23:21:21 +08:00

35 lines
797 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Models\business;
use App\BaseApp\BaseBusinessModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* 清单cc_list
*
* 一个小程序用户可以有多份清单,登录时会自动建一份「默认清单」。
*/
class ListModel extends BaseBusinessModel
{
protected $table = 'list';
protected $guarded = [];
public function items(): HasMany
{
return $this->hasMany(ListItemModel::class, 'list_id', 'id');
}
public function user(): BelongsTo
{
return $this->belongsTo(WxUserModel::class, 'user_id', 'id');
}
public function enterprise(): BelongsTo
{
return $this->belongsTo(EnterpriseModel::class, 'enterprise_id', 'id');
}
}