import mongoose from 'mongoose';

const productSchema = new mongoose.Schema({
    productCode: { type: String, required: true, unique: true },
    productName: { type: String, required: true },
    category: { type: String, required: true },
    quantityInStock: { type: Number, required: true },
    unitPrice: { type: Number, required: true },
    supplierName: { type: String, required: true },
    dateReceived: { type: Date, required: true }
}, { timestamps: true });

export default mongoose.model("Product", productSchema);
