<?php

namespace App\Entities\Customer\Wallet;

use App\Models\Customer\Wallet\AccountModel;

class AccountEntity extends WalletEntity
{
    const PK = AccountModel::PK;
    const TITLE = AccountModel::TITLE;
    protected array $nullableFields = [
        'alias'
    ];

    protected $attributes = [
        'title' => '',
        'bank' => '',
        'alias' => null,
        'issue_at' => '',
        'amount' => 0,
        'balance' => 0,
        'status' => '',
        'content' => ''
    ];
    public function __construct(array|null $data = null)
    {
        parent::__construct($data);
    }
    //기본기능
    public function getBank(): string
    {
        return $this->bank ?? '';
    }
    public function getAlias(): string
    {
        return $this->alias ?? '';
    }
    public function getIssueAt(): string
    {
        return $this->issue_at ?? '';
    }
}
