const mongoose = require("mongoose");

const reportSchema = new mongoose.Schema({
  reportCode: { type: String, required: true, unique: true },
  date: { type: Date, required: true },

  car: {
    type: mongoose.Schema.Types.ObjectId,
    ref: "Car",
    required: true
  },

 servicename: {
  type: mongoose.Schema.Types.ObjectId,
  ref: 'Service',
   required: true
},

  payment: {
    type: mongoose.Schema.Types.ObjectId,
    ref: "Payment",
    required: true
  }
});

module.exports = mongoose.model("Report", reportSchema);