You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
781 B

<?php
namespace App\Model\v3;
use App\Model\Model;
use App\Constants\v3\Withdrawal;
class StoreWithdrawal extends Model
{
protected $table = 'lanzu_store_withdrawal';
protected $appends = [
'state_text',
'check_time_text',
'created_at_text'
];
public function getStateTextAttribute()
{
return Withdrawal::getMessage($this->attributes['state']);
}
public function getCheckTimeTextAttribute()
{
if(empty($this->attributes['check_time'])){
return '';
}else {
return date('Y-m-d H:i:s', $this->attributes['check_time']);
}
}
public function getCreatedAtTimeTextAttribute()
{
return date('Y-m-d H:i:s', $this->attributes['created_at']);
}
}