| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace app\agent\model\finance;
- use think\Model;
- class Withdraw extends Model
- {
- protected $name = 'users_motor_agent_withdraw';
- protected $autoWriteTimestamp = true;
- /**
- * @var string
- */
- protected $createTime = 'created_at';
- /**
- * @var string
- */
- protected $updateTime = 'updated_at';
- protected $append = [
- 'status_text'
- ];
- public function getStatusTextAttr($value, $data)
- {
- if (isset($data['status']) && $data['status']) {
- $status = [10=>'待审核',20=>'已拒绝',30=>'已通过'];
- return $status[$data['status']];
- }
- return '-';
- }
- }
|