import mongoose from "mongoose";

const recordSchema = new mongoose.Schema({
    car: {type:mongoose.Schema.Types.ObjectId, ref: "Car"},
    slot: {type:mongoose.Schema.Types.ObjectId, ref:"ParkingSlot"},
    entryTime: {type:Date, required:true},
    exitTime: {type:Date},
    duration:{type:Number}
});
 export default mongoose.model("ParkingRecord", recordSchema);