CarApprove.php 470 B

12345678910111213141516
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. // 用车审批记录
  5. class CarApprove extends Model
  6. {
  7. public function carInfo()
  8. {
  9. return $this->belongsTo('CarInfo','id','car_id')
  10. ->alias('l')
  11. ->field('l.id,l.create_at,l.car_id,l.start_time,approve_num,l.end_time,u.name user_name,headimg')
  12. ->leftJoin('StoreMember u','u.id = l.approve_user')
  13. ->order('id asc');
  14. }
  15. }