dbmsv2/app/Entities/Customer/ServiceEntity.php
2025-09-19 14:26:05 +09:00

74 lines
1.9 KiB
PHP

<?php
namespace App\Entities\Customer;
use App\Entities\Equipment\ServerEntity;
use App\Entities\UserEntity;
use App\Models\Customer\ServiceModel;
class ServiceEntity extends CustomerEntity
{
const PK = ServiceModel::PK;
const TITLE = ServiceModel::TITLE;
const DEFAULT_STATUS = STATUS['AVAILABLE'];
public function setUserEntity(UserEntity $entity): ServiceEntity
{
$this->attributes['userEntity'] = $entity;
return $this;
}
public function getUSerEntity(): UserEntity
{
return $this->attributes['userEntity'];
}
public function setClientEntity(UserEntity $entity): ServiceEntity
{
$this->attributes['clientEntity'] = $entity;
return $this;
}
public function getClientEntity(): ClientEntity
{
return $this->attributes['clientEntity'];
}
public function setServerEntity(ServerEntity $entity): ServiceEntity
{
$this->attributes['serverEntity'] = $entity;
return $this;
}
public function getServerEntity(): ServerEntity
{
return $this->attributes['serverEntity'];
}
final public function getSite(): string
{
return $this->attributes['site'] ?? "";
}
public function getType(): string
{
return $this->attributes['type'] ?? "";
}
final public function getLocation(): string
{
return $this->attributes['location'] ?? "";
}
final public function getBillingAt(): string
{
return $this->attributes['billing_at'] ?? "";
}
final public function getAmount(): int
{
return $this->attributes['amount'] ?? 0;
}
final public function getRack(): int
{
return $this->attributes['rack'] ?? 0;
}
final public function getLine(): int
{
return $this->attributes['line'] ?? 0;
}
public function getHistory(): string
{
return $this->attributes['history'] ?? "";
}
}