| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- use App\Traits\ModelLogChanging;
- class DeliveryAppointmentCar extends Model
- {
- use ModelLogChanging;
- protected $fillable=[
- "delivery_appointment_id",
- "license_plate_number",
- "car_id",
- "driver_name",
- "driver_phone",
- "appointment_number",
- "status",
- ];
- public $timestamps=false;
- const STATUS=[
- 0 => "待送",
- 1 => "已送"
- ];
- public function deliveryAppointment()
- { //预约信息
- return $this->belongsTo(DeliveryAppointment::class);
- }
- public function car()
- { //车辆
- return $this->belongsTo(CarType::class,"car_id","id");
- }
- }
|