26 lines
561 B
PHP
26 lines
561 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['AVAIABLE'];
|
|
|
|
public function getType(): string
|
|
{
|
|
return $this->attributes['type'];
|
|
}
|
|
public function getPrice(): int
|
|
{
|
|
return $this->attributes['price'];
|
|
}
|
|
public function getFormTitle(): string
|
|
{
|
|
return number_format($this->getPrice()) . "원," . $this->getTitle();
|
|
}
|
|
}
|