From 4b0484bb03ddaebd48a1710a432a98aa2bdd02b3 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 24 Jun 2025 15:10:28 +0800 Subject: [PATCH] =?UTF-8?q?[staff]=E5=85=B3=E8=81=94=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/StaffUser.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/model/StaffUser.php b/src/model/StaffUser.php index f340ac3..810f3d0 100644 --- a/src/model/StaffUser.php +++ b/src/model/StaffUser.php @@ -3,6 +3,7 @@ namespace jerryyan\staff\model; use think\admin\Model; +use think\admin\model\SystemUser; use think\db\Query; use think\model\relation\HasOne; @@ -24,6 +25,11 @@ class StaffUser extends Model $query->where('is_deleted', '=', 0); } + public function sysUser(): HasOne + { + return $this->hasOne(SystemUser::class, 'id', 'id'); + } + public function dept(): HasOne { return $this->hasOne(StaffDept::class, 'id', 'dept_id')->where([