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

46 lines
1.1 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'];
//타 객체정의 부분
public function getCode(): string
{
return $this->attributes['code'] ?? "null";
}
public function getName(): string
{
return $this->attributes['name'];
}
public function getRole(): string
{
return $this->attributes['role'];
}
public function getSaleRate(): int
{
return $this->attributes['sale_rate'] ?? 0;
}
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
{
return $this->attributes['history'] ?? "";
}
}