dbmsv2/app/Entities/Equipment/PartEntity.php
2025-08-22 14:53:15 +09:00

29 lines
695 B
PHP

<?php
namespace App\Entities\Equipment;
use App\Models\Equipment\PartModel;
class PartEntity extends EquipmentEntity
{
const PK = PartModel::PK;
const TITLE = PartModel::TITLE;
const STATUS_AVAILABLE = "available";
const STATUS_OCCUPIED = "occupied";
const STATUS_FORBIDDEN = "forbidden";
const DEFAULT_STATUS = self::STATUS_AVAILABLE;
public function getType(): string
{
return $this->attributes['type'];
}
public function getPrice(): int
{
return (int) $this->attributes['price'];
}
public function getFormTitle(): string
{
return number_format($this->getPrice()) . "원," . $this->getTitle();
}
}