TaxiUsersWithdraw.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace app\common\model;
  3. class TaxiUsersWithdraw extends BaseModel
  4. {
  5. /**
  6. * @var string
  7. */
  8. protected $name = 'taxi_user_withdraw';
  9. /**
  10. * @var array
  11. */
  12. protected $auto = [];
  13. /**
  14. * @var array
  15. */
  16. protected $insert = ['created_at','updated_at'];
  17. /**
  18. * @var array
  19. */
  20. protected $update = ['updated_at'];
  21. /**
  22. * 关联用户
  23. * @return \think\model\relation\BelongsTo
  24. */
  25. public function user()
  26. {
  27. return $this->belongsTo('Users','user_id','id');
  28. }
  29. /**
  30. * 关联用户
  31. * @return \think\model\relation\BelongsTo
  32. */
  33. public function taxiUser()
  34. {
  35. return $this->belongsTo('TaxiUser','taxi_uid','id');
  36. }
  37. /**
  38. * @param $value
  39. * @return false|string
  40. */
  41. public function getWechatQrcodeAttr($value)
  42. {
  43. return ['val'=>$value,'url'=> get_annex_url($value)];
  44. }
  45. /**
  46. * @param $value
  47. * @return false|string
  48. */
  49. public function getAlipayQrcodeAttr($value)
  50. {
  51. return ['val'=>$value,'url'=> get_annex_url($value)];
  52. }
  53. /**
  54. * @param $value
  55. * @return false|string
  56. */
  57. public function getCreatedAtAttr($value)
  58. {
  59. return ['val'=>$value,'text'=>date('m.d H:i', $value)];
  60. }
  61. }