'if_exist|numeric', 'user_id' => 'if_exist|trim|string', 'passwd' => 'if_exist|trim|string', // 'confirmpassword' => 'if_exist|trim|matches[passwd]', 'user_name' => 'if_exist|trim|string', 'user_state' => 'if_exist|trim|string', 'user_email' => 'if_exist|trim|valid_email', 'user_level' => 'if_exist|numeric', 'user_point' => 'if_exist|numeric', // 'proxied' => 'if_exist|in_list[on,off]', // 'fixed' => 'if_exist|in_list[on,off]', // 'locked' => 'if_exist|in_list[on,off]', // 'updated_at' => 'if_exist|valid_date', // 'created_at' => 'if_exist|valid_date', ]; public function getPK(): string { return $this->primaryKey; } public function getEntityByPK(int $uid): null|FreeboardEntity { $this->where($this->getPK(), $uid); return $this->getEntity(); } public function getEntityByID(string $id): null|FreeboardEntity { $this->where('user_id', $id); return $this->getEntity(); } }