import mongoose from "mongoose";

const stockOutSchema = new mongoose.Schema({
  sparePart_id: {
    type: mongoose.Schema.Types.ObjectId,
    ref: "Spare_Part",
    required: true
  },

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

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

  stockOutTotalPrice: {
    type: Number
  },

  stockOutDate: {
    type: Date,
    default: Date.now
  }
});

const StockOut = mongoose.model("Stock_Out", stockOutSchema);

export default StockOut;