import mongoose from 'mongoose';

const warehouseSchema = new mongoose.Schema(
  {
    warehouseCode: {
      type: String,
      required: [true, 'Warehouse code is required'],
      unique: true,
      trim: true,
    },
    warehouseName: {
      type: String,
      required: [true, 'Warehouse name is required'],
      trim: true,
    },
    warehouseLocation: {
      type: String,
      required: [true, 'Warehouse location is required'],
      trim: true,
    },
  },
  {
    timestamps: true,
  }
);

const Warehouse = mongoose.model('Warehouse', warehouseSchema);

export default Warehouse;
