37 lines
850 B
PHP
37 lines
850 B
PHP
<?php
|
|
|
|
namespace App\Entities\Customer;
|
|
|
|
use App\Models\Customer\ClientModel;
|
|
|
|
class ClientEntity extends CustomerEntity
|
|
{
|
|
const PK = ClientModel::PK;
|
|
const TITLE = ClientModel::TITLE;
|
|
//타 객체정의 부분
|
|
public function getSerialCode(): string
|
|
{
|
|
return "C" . $this->getPK();
|
|
}
|
|
public function getName(): string
|
|
{
|
|
return $this->attributes['name'];
|
|
}
|
|
public function getRole(): string
|
|
{
|
|
return $this->attributes['role'];
|
|
}
|
|
public function getAccountBalance(): int
|
|
{
|
|
return intval($this->attributes['account_balance']);
|
|
}
|
|
public function getCouponBalance(): int
|
|
{
|
|
return intval($this->attributes['coupon_balance']);
|
|
}
|
|
public function getPointBalance(): int
|
|
{
|
|
return intval($this->attributes['point_balance']);
|
|
}
|
|
}
|