UserPaymentOrder.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace app\api\model\taxi;
  3. use app\common\model\BaseModel;
  4. class UserPaymentOrder extends BaseModel
  5. {
  6. protected $name = 'taxi_user_payment_order';
  7. protected $insert = ['created_at','updated_at'];
  8. protected $update = ['updated_at'];
  9. /**
  10. * @desc 摩的代理
  11. * @return \think\model\relation\BelongsTo
  12. * @author weichuanbao<654745815@qq.com>
  13. * @date 2022/1/5 0005
  14. */
  15. public function agent(): \think\model\relation\BelongsTo
  16. {
  17. return $this->belongsTo('\app\api\model\user\MotorAgent', 'user_id', 'user_id')
  18. ->field('id,user_id,status');
  19. }
  20. /**
  21. * @desc 用户
  22. * @return \think\model\relation\BelongsTo
  23. * @author weichuanbao<654745815@qq.com>
  24. * @date 2022/1/5 0005
  25. */
  26. public function user(): \think\model\relation\BelongsTo
  27. {
  28. return $this->belongsTo('\app\common\model\Users', 'user_id')
  29. ->field('id,is_motor_agent');
  30. }
  31. /**
  32. * @desc 司机
  33. * @return \think\model\relation\BelongsTo
  34. * @author weichuanbao<654745815@qq.com>
  35. * @date 2022/1/5 0005
  36. */
  37. public function driver(): \think\model\relation\BelongsTo
  38. {
  39. return $this->belongsTo('\app\api\model\taxi\User', 'user_id', 'user_id')
  40. ->field('id,user_id,status');
  41. }
  42. }