getEntity($serverPartEntity->getPartUID()); if (!$entity instanceof IPEntity) { throw new \Exception("{$serverPartEntity->getPartUID()}에 해당하는 IP정보를 찾을수없습니다."); } //IP정보 수정 return $this->getModel()->modify($entity, $formDatas); } public function createServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity { $formDatas = []; $formDatas['clientinfo_uid'] = $serverPartEntity->getClientInfoUID(); $formDatas['serviceinfo_uid'] = $serverPartEntity->getServiceInfoUID(); $formDatas['serverinfo_uid'] = $serverPartEntity->getServerInfoUID(); $formDatas['status'] = STATUS['OCCUPIED']; $entity = $this->action_process($serverPartEntity, $formDatas); return $serverPartEntity->setPartEntity($entity); } public function modifyServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity { return $this->createServerPart($serverPartEntity); } public function deleteServerPart(ServerPartEntity $serverPartEntity): ServerPartEntity { $formDatas = []; $formDatas['clientinfo_uid'] = null; $formDatas['serviceinfo_uid'] = null; $formDatas['serverinfo_uid'] = null; $formDatas['status'] = STATUS['AVAILABLE']; $entity = $this->action_process($serverPartEntity, $formDatas); return $serverPartEntity->setPartEntity($entity); } }