| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\api\model\taxi;
- use app\common\model\BaseModel;
- class UserPaymentOrder extends BaseModel
- {
- protected $name = 'taxi_user_payment_order';
- protected $insert = ['created_at','updated_at'];
- protected $update = ['updated_at'];
- /**
- * @desc 摩的代理
- * @return \think\model\relation\BelongsTo
- * @author weichuanbao<654745815@qq.com>
- * @date 2022/1/5 0005
- */
- public function agent(): \think\model\relation\BelongsTo
- {
- return $this->belongsTo('\app\api\model\user\MotorAgent', 'user_id', 'user_id')
- ->field('id,user_id,status');
- }
- /**
- * @desc 用户
- * @return \think\model\relation\BelongsTo
- * @author weichuanbao<654745815@qq.com>
- * @date 2022/1/5 0005
- */
- public function user(): \think\model\relation\BelongsTo
- {
- return $this->belongsTo('\app\common\model\Users', 'user_id')
- ->field('id,is_motor_agent');
- }
- /**
- * @desc 司机
- * @return \think\model\relation\BelongsTo
- * @author weichuanbao<654745815@qq.com>
- * @date 2022/1/5 0005
- */
- public function driver(): \think\model\relation\BelongsTo
- {
- return $this->belongsTo('\app\api\model\taxi\User', 'user_id', 'user_id')
- ->field('id,user_id,status');
- }
- }
|