  const mongoose = require("mongoose");

  const blacklistVehicleSchema = new mongoose.Schema(
    {
      plateNumber: {
        type: String,
        required: true,
        trim: true,
        uppercase: true,
        unique: true,
        //   index: true
      },

      reason: {
        type: String,
        required: true,
        trim: true,
      },

      addedBy: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "User",
      },

      blacklistedAt: {
        type: Date,
        default: Date.now,
      },

      updatedBy: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "User",
      },
      isActive: {
        type: Boolean,
        default: true,
      },

      isDeleted: {
        type: Boolean,
        default: false,
      },
    },
    {
      timestamps: true,
    },
  );

  module.exports = mongoose.model("BlacklistVehicle", blacklistVehicleSchema);
