dggmyyc/application/common/model/WithdrawApply.php

84 lines
2.0 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* 提现申请记录表模型
*/
namespace app\common\model;
use think\model\concern\SoftDelete;
class WithdrawApply extends Model
{
protected $name = 'withdraw_apply';
protected $autoWriteTimestamp = true;
//可搜索字段
protected $searchField = ['description',];
//withdraw
public $WITHDRAW_TYPE = [
'1' =>'支付宝',
'2' =>'微信',
'3' =>'银行卡',
];
public $STATUSA_TYPE = [
'1' =>'待审核',
'2' =>'同意',
'3' =>'驳回',
];
public $STATUS_TYPE = [
'1' =>'审核中',
'2' =>'提现成功',
'3' =>'提现失败',
];
public function getTypeTextAttr($value, $data)
{
return $this->WITHDRAW_TYPE[$data['type']];
}
//状态1-待提现2-提现中3-提现成功4-提现失败获取器
public function getStatusaTextAttr($value, $data)
{
return $this->STATUSA_TYPE[$data['status']];
}
//状态1-待提现2-提现中3-提现成功4-提现失败获取器
public function getStatusTextAttr($value, $data)
{
return $this->STATUS_TYPE[$data['status']];
}
//支付时间获取器
public function getPaymentTimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
//支付时间修改器
public function setPaymentTimeAttr($value)
{
return strtotime($value);
}//转账时间获取器
public function getTransferTimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
//转账时间修改器
public function setTransferTimeAttr($value)
{
return strtotime($value);
}//重新支付时间获取器
public function getRepayTimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
//重新支付时间修改器
public function setRepayTimeAttr($value)
{
return strtotime($value);
}
}