data_center/app/common/model/user/UserBalance.php

22 lines
539 B
PHP

<?php
namespace app\common\model\user;
use app\common\model\BaseModel;
class UserBalance extends BaseModel
{
protected $name = 'user_balance';
public function getTypeTextAttr($value,$data): string
{
$type = [0=>'支出',1=>'收入'];
return $type[$data['type']];
}
public function getPayTypeTextAttr($value,$data): string
{
$pay_type = [ 0=>'微信支付', 2=>'支付宝支付', 3=>'银行卡支付', 4=>'余额支付', 5=>'其他'];
return $pay_type[$data['pay_type']];
}
}