<?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",
        "delivery_time",
        "status",
    ];
    const STATUS = [
        0 => "未送达",
        1 => "作业中",
        2 => "已完成",
    ];
    public $timestamps=false;

    public function deliveryAppointment()
    {   //预约信息
        return $this->belongsTo(DeliveryAppointment::class);
    }
    public function car()
    {   //车辆
        return $this->belongsTo(CarType::class,"car_id","id");
    }
}
