var mongoose = require('mongoose');

var productSchema = new mongoose.Schema({
  productCode: { type: String, required: true, unique: true, trim: true },
  productName: { type: String, required: true, trim: true },
  quantitySold: { type: Number, required: true, min: 0 },
  unitPrice: { type: Number, required: true, min: 0 },
}, { timestamps: true });

module.exports = mongoose.model('Product', productSchema);
