29 lines
604 B
PHP
29 lines
604 B
PHP
<?php
|
|
|
|
namespace App\Entities\Equipment;
|
|
|
|
use App\Models\Equipment\CHASSISModel;
|
|
|
|
class CHASSISEntity extends EquipmentEntity
|
|
{
|
|
const PK = CHASSISModel::PK;
|
|
const TITLE = CHASSISModel::TITLE;
|
|
//기본기능
|
|
public function getPrice(): int
|
|
{
|
|
return $this->attributes['price'];
|
|
}
|
|
public function getStock(): int
|
|
{
|
|
return $this->attributes['stock'];
|
|
}
|
|
public function getUsed(): int
|
|
{
|
|
return $this->attributes['used'];
|
|
}
|
|
public function getAvailable(): int
|
|
{
|
|
return $this->getStock() - $this->getUsed();
|
|
}
|
|
}
|