dbmsv4/app/Entities/Part/RAMEntity.php
2025-11-26 14:52:50 +09:00

25 lines
482 B
PHP

<?php
namespace App\Entities\Part;
use App\Models\Part\RAMModel;
class RAMEntity extends PartEntity
{
const PK = RAMModel::PK;
const TITLE = RAMModel::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();
}
}