22 lines
499 B
PHP
22 lines
499 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'];
|
|
//기본기능용
|
|
public function getCustomTitle(): string
|
|
{
|
|
return sprintf("[%s] %s", $this->getCode(), $this->getTitle());
|
|
}
|
|
public function getPrice(): int
|
|
{
|
|
return $this->attributes['price'] ?? 0;
|
|
}
|
|
}
|