dbmsv2/app/Entities/Customer/ServiceEntity.php
2025-09-10 17:48:54 +09:00

66 lines
1.7 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'];
}
public function getCode(): string|null
{
return $this->attributes['code'];
}
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;
}
}