import mongoose from "mongoose";

const vehicleConfigSchema = new mongoose.Schema ({

    vehicleId:{
        type:Number,
        required:true,
        unique:true
    },

    fuelTypeId:{
        type:mongoose.Schema.Types.ObjectId,
        ref:"FuelType",
        required:true,
    },

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

    currentMileage:{
        type:Number
    },

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

    active:{
        type:Boolean,
        default:true
    }
},
{
    timestamps:true
}
);

export default mongoose.model("VehicleConfig", vehicleConfigSchema);