mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-07 19:40:49 +08:00
feat(notice): 通知三表模型 Base/App 双层
This commit is contained in:
32
extend/base/admin/model/SystemNoticeBase.php
Normal file
32
extend/base/admin/model/SystemNoticeBase.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace base\admin\model;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $scene 通知场景
|
||||
* @property string $title 通知标题
|
||||
* @property string $content 通知内容
|
||||
* @property string $biz_id 业务关联ID
|
||||
* @property int $send_admin_id 发送管理员ID
|
||||
* @property int $create_time 创建时间
|
||||
* @property int $update_time 更新时间
|
||||
* @property int $delete_time 删除时间
|
||||
* @property \app\admin\model\SystemAdmin|null $sendAdmin 发送管理员
|
||||
*/
|
||||
class SystemNoticeBase extends TimeModel
|
||||
{
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
/**
|
||||
* 发送管理员.
|
||||
* 仅按需显式调用时才查询;列表页请勿用 withJoin 预载
|
||||
* (system_admin 与主表存在 id/status 等同名字段,join 会产生歧义)。
|
||||
*/
|
||||
public function sendAdmin()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\SystemAdmin', 'send_admin_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user