select(); } /** * @return int * @author xaboy * @day 2020-04-01 */ public function count() { return SystemGroup::getDB()->count(); } /** * @param $page * @param $limit * @return BaseQuery * @author xaboy * @day 2020-04-01 */ public function page($page, $limit) { return SystemGroup::getDB()->page($page, $limit); } /** * @param $key * @param int|null $except * @return bool * @author xaboy * @day 2020-03-27 */ public function keyExists($key, ?int $except = null): bool { return parent::fieldExists('group_key', $key, $except); } /** * @param $id * @return mixed * @author xaboy * @day 2020-04-02 */ public function fields($id) { return json_decode(SystemGroup::getDB()->where('group_id', $id)->value('fields'), true); } /** * @param string $key * @return mixed * @author xaboy * @day 2020/5/27 */ public function keyById(string $key) { return SystemGroup::getDB()->where('group_key', $key)->value('group_id'); } }