dbmsv4/app/Entities/Equipment/ServerEntity.php
2025-11-25 11:52:10 +09:00

49 lines
1.2 KiB
PHP

<?php
namespace App\Entities\Equipment;
use App\Models\Equipment\ServerModel;
class ServerEntity extends EquipmentEntity
{
const PK = ServerModel::PK;
const TITLE = ServerModel::TITLE;
final public function getClientInfoUID(): int|null
{
return $this->attributes['clientinfo_uid'] ?? null;
}
final public function getServiceInfoUID(): int|null
{
return $this->attributes['serviceinfo_uid'] ?? null;
}
final public function getSwitchInfoUID(): int|null
{
return $this->attributes['switchinfo_uid'] ?? null;
}
//기본기능용
public function getCustomTitle(mixed $title = null): string
{
return sprintf("[%s]%s", $this->getCode(), $title ? $title : $this->getIP());
}
final public function getCode(): string
{
return $this->attributes['code'];
}
public function getPrice(): int
{
return $this->attributes['price'];
}
public function getType(): string
{
return $this->attributes['type'];
}
public function getIP(): string|null
{
return $this->attributes['ip'] ?? null;
}
public function getOS(): string|null
{
return $this->attributes['os'] ?? null;
}
}