From e35ab4b1be0267f49eb4b409575d77a6acff17f1 Mon Sep 17 00:00:00 2001 From: augushong Date: Mon, 12 Oct 2026 10:53:00 +0000 Subject: [PATCH] =?UTF-8?q?feat(notice):=20=E9=80=9A=E7=9F=A5=E4=B8=89?= =?UTF-8?q?=E8=A1=A8=E6=A8=A1=E5=9E=8B=20Base/App=20=E5=8F=8C=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/model/SystemNotice.php | 9 +++ app/admin/model/SystemNoticeSubscribe.php | 9 +++ app/admin/model/SystemNoticeTarget.php | 9 +++ extend/base/admin/model/SystemNoticeBase.php | 32 +++++++++ .../admin/model/SystemNoticeSubscribeBase.php | 23 ++++++ .../admin/model/SystemNoticeTargetBase.php | 71 +++++++++++++++++++ 6 files changed, 153 insertions(+) create mode 100644 app/admin/model/SystemNotice.php create mode 100644 app/admin/model/SystemNoticeSubscribe.php create mode 100644 app/admin/model/SystemNoticeTarget.php create mode 100644 extend/base/admin/model/SystemNoticeBase.php create mode 100644 extend/base/admin/model/SystemNoticeSubscribeBase.php create mode 100644 extend/base/admin/model/SystemNoticeTargetBase.php diff --git a/app/admin/model/SystemNotice.php b/app/admin/model/SystemNotice.php new file mode 100644 index 0000000..8901d3d --- /dev/null +++ b/app/admin/model/SystemNotice.php @@ -0,0 +1,9 @@ +belongsTo('app\admin\model\SystemAdmin', 'send_admin_id', 'id'); + } +} diff --git a/extend/base/admin/model/SystemNoticeSubscribeBase.php b/extend/base/admin/model/SystemNoticeSubscribeBase.php new file mode 100644 index 0000000..22fec40 --- /dev/null +++ b/extend/base/admin/model/SystemNoticeSubscribeBase.php @@ -0,0 +1,23 @@ +belongsTo('app\admin\model\SystemNotice', 'notice_id', 'id'); + } + + /** + * 接收管理员. + * 仅按需显式调用时才查询;列表页请勿用 withJoin 预载 + * (system_admin 与主表存在 id/status 等同名字段,join 会产生歧义)。 + */ + public function admin() + { + return $this->belongsTo('app\admin\model\SystemAdmin', 'admin_id', 'id'); + } +}