dbmsv2/app/Entities/Equipment/PartEntity.php
2025-09-17 15:04:01 +09:00

30 lines
661 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 DEFAULT_STATUS = STATUS['AVAILABLE'];
public function getType(): string
{
return $this->attributes['type'];
}
public function getPrice(): int
{
return $this->attributes['price'];
}
public function getStock(): int
{
return $this->attributes['stock'];
}
public function getCustomTitle(): string
{
return $this->getTitle() . " " . number_format($this->getPrice()) . "";
}
}