25 lines
498 B
PHP
25 lines
498 B
PHP
<?php
|
|
|
|
namespace App\Entities\Part;
|
|
|
|
use App\Models\Part\CHASSISModel;
|
|
|
|
class CHASSISEntity extends PartEntity
|
|
{
|
|
const PK = CHASSISModel::PK;
|
|
const TITLE = CHASSISModel::TITLE;
|
|
//기본기능
|
|
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();
|
|
}
|
|
}
|