DeliveryAppointmentCar.php 667 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. class DeliveryAppointmentCar extends Model
  6. {
  7. use ModelLogChanging;
  8. protected $fillable=[
  9. "delivery_appointment_id",
  10. "license_plate_number",
  11. "car_id",
  12. "driver_name",
  13. "driver_phone",
  14. "appointment_number",
  15. "delivery_time",
  16. ];
  17. public $timestamps=false;
  18. public function deliveryAppointment()
  19. { //预约信息
  20. return $this->belongsTo(DeliveryAppointment::class);
  21. }
  22. public function car()
  23. { //车辆
  24. return $this->belongsTo(CarType::class,"car_id","id");
  25. }
  26. }