dbmsv2/app/Services/Equipment/Server/ServerPartService.php
2025-09-24 14:02:59 +09:00

36 lines
1017 B
PHP

<?php
namespace App\Services\Equipment\Server;
use App\Entities\Equipment\ServerEntity;
use App\Services\Equipment\ServerPartService as ParentService;
use App\Interfaces\Equipment\ServerInterface;
class ServerPartService extends ParentService implements ServerInterface
{
public function __construct()
{
parent::__construct();
}
public function createServer(ServerEntity $serverEntity): ServerEntity
{
//아무것도 하지 않음
return $serverEntity;
}
//create와 같은 작업임
public function modifyServer(ServerEntity $serverEntity): ServerEntity
{
//아무것도 하지 않음
return $serverEntity;
}
public function deleteServer(ServerEntity $serverEntity): ServerEntity
{
//기존 ServerPart정보 삭제
foreach ($this->getEntities(['serverinfo_uid' => $serverEntity->getPK()]) as $serverPartEntity) {
parent::delete($serverPartEntity);
}
return $serverEntity;
}
}