38 lines
950 B
PHP
38 lines
950 B
PHP
<?php
|
|
|
|
namespace App\Entities\Equipment;
|
|
|
|
use App\Models\Equipment\ServerModel;
|
|
|
|
class ServerEntity extends EquipmentEntity
|
|
{
|
|
const PK = ServerModel::PK;
|
|
const TITLE = ServerModel::TITLE;
|
|
const STATUS_AVAILABLE = "available";
|
|
const STATUS_OCCUPIED = "occupied";
|
|
const STATUS_FORBIDDEN = "forbidden";
|
|
const DEFAULT_STATUS = self::STATUS_AVAILABLE;
|
|
|
|
public function getCode(): string
|
|
{
|
|
return $this->attributes['code'];
|
|
}
|
|
public function getClientInfoUID(): int|null
|
|
{
|
|
return $this->attributes['clientinfo_uid'] ?? null;
|
|
}
|
|
public function getServiceInfoUID(): int|null
|
|
{
|
|
return $this->attributes['serviceinfo_uid'] ?? null;
|
|
}
|
|
|
|
public function setServerParts(array $datas): void
|
|
{
|
|
$this->attributes['server_parts'] = $datas;
|
|
}
|
|
public function getServerParts(): array
|
|
{
|
|
return $this->attributes['server_parts'] ?? [];
|
|
}
|
|
}
|