35 lines
854 B
PHP
35 lines
854 B
PHP
<?php
|
|
|
|
namespace App\Entities\Part;
|
|
|
|
use App\Entities\CommonEntity;
|
|
|
|
abstract class PartEntity extends CommonEntity
|
|
{
|
|
public function __construct(array|null $data = null)
|
|
{
|
|
parent::__construct($data);
|
|
}
|
|
final public function getClientInfoUID(): int|null
|
|
{
|
|
return $this->attributes['clientinfo_uid'];
|
|
}
|
|
final public function getServiceInfoUID(): int|null
|
|
{
|
|
return $this->attributes['serviceinfo_uid'];
|
|
}
|
|
final public function getServerInfoUID(): int|null
|
|
{
|
|
return $this->attributes['serverinfo_uid'];
|
|
}
|
|
//기본기능용
|
|
final public function getCustomTitle(): string
|
|
{
|
|
return $this->getTitle() . " " . number_format($this->getPrice()) . "원";
|
|
}
|
|
final public function getPrice(): int
|
|
{
|
|
return $this->attributes['price'];
|
|
}
|
|
}
|