dbmsv3/app/Entities/Customer/ClientEntity.php
2025-10-17 18:22:57 +09:00

54 lines
1.3 KiB
PHP

<?php
namespace App\Entities\Customer;
use App\Models\Customer\ClientModel;
class ClientEntity extends CustomerEntity
{
const PK = ClientModel::PK;
const TITLE = ClientModel::TITLE;
const DEFAULT_STATUS = STATUS['AVAILABLE'];
final public function getUserUID(): int|null
{
return $this->attributes['user_uid'] ?? null;
}
//기본기능
public function getCustomTitle(mixed $title = null): string
{
return sprintf("[%s]%s", $this->getSite(), $title ? $title : $this->getTitle());
}
final public function getCode(): string
{
return $this->attributes['code'];
}
public function getName(): string
{
return $this->attributes['name'];
}
public function getSite(): string
{
return $this->attributes['site'];
}
public function getRole(): string
{
return $this->attributes['role'];
}
public function getAccountBalance(): int
{
return $this->attributes['account_balance'];
}
public function getCouponBalance(): int
{
return $this->attributes['coupon_balance'];
}
public function getPointBalance(): int
{
return $this->attributes['point_balance'];
}
public function getHistory(): string|null
{
return $this->attributes['history'];
}
}