<?php

namespace App\Entities\Customer;

use App\Models\Customer\ClientModel;

class ClientEntity extends CustomerEntity
{
    const PK = ClientModel::PK;
    const TITLE = ClientModel::TITLE;

    const STATUS_NORMAL = "normal";
    const STATUS_PAUSE = "pause";
    const STATUS_TERMINATED = "terminated";
    const DEFAULT_STATUS    = self::STATUS_NORMAL;

    //타 객체정의 부분
    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 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']);
    }
}
