import mongoose from "mongoose";

const vehicleAssigSchema = new mongoose.Schema({

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

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

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

    unassignmentDate:{
        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);