| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace app\agent\model\order;
- use app\common\model\BaseModel;
- class Taxi extends BaseModel
- {
- /**
- * @var string
- */
- protected $name = 'taxi_order';
- /**
- * 关联车俩
- * @return \think\model\relation\BelongsTo
- */
- public function user()
- {
- return $this->belongsTo('\app\common\model\Users','user_id');
- }
- /**
- * 关联车俩
- * @return \think\model\relation\BelongsTo
- */
- public function taxi()
- {
- return $this->belongsTo('\app\common\model\Taxi','taxi_id');
- }
- /**
- * 关联支付订单
- * @return \think\model\relation\BelongsTo
- */
- public function paylog()
- {
- return $this->belongsTo('\app\common\model\OrderPaylog','id', 'order_idx')
- ->field('order_idx,out_trade_no,total_price,pay_type');
- }
- public function category()
- {
- return $this->belongsTo('\app\common\model\TaxiServiceCategory', 'category_id')
- ->field('id,name,color');
- }
- }
|