Withdraw.php 670 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\agent\model\finance;
  3. use think\Model;
  4. class Withdraw extends Model
  5. {
  6. protected $name = 'users_motor_agent_withdraw';
  7. protected $autoWriteTimestamp = true;
  8. /**
  9. * @var string
  10. */
  11. protected $createTime = 'created_at';
  12. /**
  13. * @var string
  14. */
  15. protected $updateTime = 'updated_at';
  16. protected $append = [
  17. 'status_text'
  18. ];
  19. public function getStatusTextAttr($value, $data)
  20. {
  21. if (isset($data['status']) && $data['status']) {
  22. $status = [10=>'待审核',20=>'已拒绝',30=>'已通过'];
  23. return $status[$data['status']];
  24. }
  25. return '-';
  26. }
  27. }