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