update user and roles model

This commit is contained in:
2026-03-09 14:11:38 +08:00
parent f95eff3963
commit 9022bc131a
2 changed files with 25 additions and 0 deletions
+8
View File
@@ -152,6 +152,14 @@ class User extends Model implements Authenticatable
return $this->hasMany(Platform::class, 'developer_id');
}
/**
* 用户的数据访问范围
*/
public function dataScopes(): HasMany
{
return $this->hasMany(UserDataScope::class, 'user_id');
}
// @TODO 重新实现删除用户时平台归属转移逻辑(Hyperf 不支持 static::deleting 事件绑定)
/**