38 lines
895 B
PHP
38 lines
895 B
PHP
<?php
|
|
|
|
namespace App\Entities\Part;
|
|
|
|
use App\Models\Part\SWITCHModel;
|
|
|
|
class SWITCHEntity extends PartEntity
|
|
{
|
|
const PK = SWITCHModel::PK;
|
|
const TITLE = SWITCHModel::TITLE;
|
|
protected $attributes = [
|
|
'code' => 0,
|
|
'price' => 0,
|
|
'status' => '',
|
|
];
|
|
public function __construct(array|null $data = null)
|
|
{
|
|
$this->attributes['code'] = '';
|
|
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'];
|
|
}
|
|
public function getCode(): string
|
|
{
|
|
return $this->attributes['code'] ?? "";
|
|
}
|
|
}
|