44 lines
1023 B
PHP
44 lines
1023 B
PHP
<?php
|
|
|
|
namespace App\Entities\Customer\Wallet;
|
|
|
|
use App\Entities\Customer\CustomerEntity;
|
|
|
|
|
|
abstract class WalletEntity extends CustomerEntity
|
|
{
|
|
protected $attributes = [
|
|
'title' => '',
|
|
'amount' => 0,
|
|
'balance' => 0,
|
|
'status' => STATUS['DEPOSIT'], // 기본 상태
|
|
'content' => ''
|
|
];
|
|
|
|
public function __construct(array|null $data = null)
|
|
{
|
|
parent::__construct($data);
|
|
}
|
|
final public function getUserUid(): int|null
|
|
{
|
|
return $this->attributes['user_uid'] ?? null;
|
|
}
|
|
final public function getClientInfoUid(): int|null
|
|
{
|
|
return $this->attributes['clientinfo_uid'] ?? null;
|
|
}
|
|
//기본기능
|
|
final public function getAmount(): int
|
|
{
|
|
return $this->attributes['amount'] ?? 0;
|
|
}
|
|
final public function getBalance(): int
|
|
{
|
|
return $this->attributes['balance'] ?? 0;
|
|
}
|
|
final public function getContent(): string
|
|
{
|
|
return $this->attributes['content'] ?? '';
|
|
}
|
|
}
|