dbmsv2/app/Entities/Equipment/ServerEntity.php
2025-08-27 11:14:41 +09:00

38 lines
971 B
PHP

<?php
namespace App\Entities\Equipment;
use App\Models\Equipment\ServerModel;
class ServerEntity extends EquipmentEntity
{
const PK = ServerModel::PK;
const TITLE = ServerModel::TITLE;
const STATUS_AVAILABLE = "available";
const STATUS_OCCUPIED = "occupied";
const STATUS_FORBIDDEN = "forbidden";
const DEFAULT_STATUS = self::STATUS_AVAILABLE;
public function setServerParts(array $datas): void
{
$this->attributes['server_parts'] = $datas;
}
public function getServerParts(): array
{
return $this->attributes['server_parts'] ?? [];
}
//기본기능용
public function getCode(): string
{
return $this->attributes['code'];
}
public function getClientInfoUID(): int|null
{
return $this->attributes['clientinfo_uid'] ?? null;
}
public function getServiceInfoUID(): int|null
{
return $this->attributes['serviceinfo_uid'] ?? null;
}
}