dbmsv4/app/Entities/Customer/ServiceEntity.php
2026-01-29 17:06:25 +09:00

88 lines
2.0 KiB
PHP

<?php
namespace App\Entities\Customer;
use App\Models\Customer\ServiceModel;
class ServiceEntity extends CustomerEntity
{
const PK = ServiceModel::PK;
const TITLE = ServiceModel::TITLE;
protected $attributes = [
'code' => '',
'title' => '',
'site' => '',
'location' => '',
'rack' => 0,
'coupon_balance' => 0,
'line' => 0,
'billing_at' => '',
'sale' => 0,
'amount' => 0,
'start_at' => '',
'end_at' => '',
'status' => '',
'history' => ''
];
public function __construct(array|null $data = null)
{
parent::__construct($data);
}
final public function getUserUid(): int|null
{
return $this->user_uid ?? null;
}
final public function getClientInfoUid(): int|null
{
return $this->clientinfo_uid ?? null;
}
final public function getServerInfoUid(): int|null
{
return $this->serverinfo_uid ?? null;
}
//기본기능용
final public function getCode(): string
{
return $this->code ?? '';
}
final public function getSite(): string
{
return $this->site ?? '';
}
final public function getLocation(): string
{
return $this->location ?? '';
}
final public function getBillingAt(): string
{
return $this->billing_at ?? '';
}
//청구금액->기본:상면비+회선비+서버금액(price)+서버파트연결(월비용)-할인액
//상면비
final public function getRack(): int
{
return $this->rack ?? 0;
}
//회선비
final public function getLine(): int
{
return $this->line ?? 0;
}
final public function getSale(): int
{
return $this->sale ?? 0;
}
final public function getAmount(): int
{
return $this->amount ?? 0;
}
final public function getStartAt(): string
{
return $this->start_at ?? '';
}
public function getHistory(): string
{
return $this->history ?? '';
}
}