import mongoose, { mongo } from "mongoose";

const vehicleAssigSchema = new mongoose.Schema({

    vehicleNumber:{
        type:Number,
        required:true
    },

    exployeeId:{
        type:Number,
        required:true
    },

    assigmentDate:{
        type:Date,
        required:true
    },

    unassigmentDate:{
        type:Date
    },

    active:{
        type:Boolean,
        default:true
    },

    createdBy:{
        type:mongoose.Schema.Types.ObjectId,
        ref:"User",
        required:true
    }
},

{
    timestamps:true
}
);

export default mongoose.model("VehicleAssig", vehicleAssigSchema)