38 lines
962 B
PHP
38 lines
962 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 DEFAULT_STATUS = STATUS['AVAILABLE'];
|
|
final public function getClientInfoUID(): string|null
|
|
{
|
|
return $this->attributes['clientinfo_uid'] ?? null;
|
|
}
|
|
final public function getServiceInfoUID(): string|null
|
|
{
|
|
return $this->attributes['serviceinfo_uid'] ?? null;
|
|
}
|
|
//기본기능용
|
|
public function getCustomTitle(): string
|
|
{
|
|
return sprintf("[%s] %s", $this->getCode(), $this->getTitle());
|
|
}
|
|
public function getPrice(): int
|
|
{
|
|
return $this->attributes['price'] ?? 0;
|
|
}
|
|
public function getType(): string
|
|
{
|
|
return $this->attributes['type'] ?? "";
|
|
}
|
|
public function getIP(): string|null
|
|
{
|
|
return $this->attributes['ip'] ?? null;
|
|
}
|
|
}
|