getEntity($serverEntity->getServiceInfoUID()); if (!$entity instanceof ServiceEntity) { throw new \Exception("[{$serverEntity->getServiceInfoUID()}]에 대한 서비스정보를 찾을수 없습니다."); } //서비스금액은 modify 함수내에서 재계산을 하므로 여기서는 modify만 호출함 return $this->getModel()->modify($entity, []); } public function createServer(ServerEntity $serverEntity): ServerEntity { //아무것도 하지 않음 return $serverEntity; } public function modifyServer(ServerEntity $serverEntity): ServerEntity { $this->action_process($serverEntity); return $serverEntity; } public function deleteServer(ServerEntity $serverEntity): ServerEntity { if ($serverEntity->getServiceInfoUID() !== null || $serverEntity->getStatus() === STATUS['OCCUPIED']) { throw new \Exception("서비스중이 서버는 삭제하실수 없습니다."); } return $serverEntity; } }