'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', ]; protected $validationMessages = []; protected $skipValidation = false; protected $cleanValidationRules = true; // Callbacks protected $allowCallbacks = true; protected $beforeInsert = []; protected $afterInsert = []; protected $beforeUpdate = []; protected $afterUpdate = []; protected $beforeFind = []; protected $afterFind = []; protected $beforeDelete = []; protected $afterDelete = []; public function getEntity(string $uid): null|UserEntity { return $this->asObject(UserEntity::class)->where($this->primaryKey, $uid)->first(); } public function setEntity(UserEntity $entity): UserEntity { if ($entity->hasChanged()) { if (!$this->save($entity)) { throw new \Exception(__FUNCTION__ . " 오류 발생.\n" . var_export($this->errors(), true)); } } return $entity;; } public function getEntitys(): array { return $this->asObject(UserEntity::class)->findAll(); } }