['name'], ]; } /** * @notes 获取项目角色设置列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2023/12/13 14:23 */ public function lists(): array { return ProjectRoleSet::where($this->searchWhere) ->field(['id', 'name', 'sort']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取项目角色设置数量 * @return int * @author likeadmin * @date 2023/12/13 14:23 */ public function count(): int { return ProjectRoleSet::where($this->searchWhere)->count(); } }