import mongoose from 'mongoose'

const saleSchema = new mongoose.Schema({
     customer:{type:mongoose.Schema.Types.ObjectId, ref:"Customer", required:true},
     product:{type:mongoose.Schema.Types.ObjectId, ref:"Product", required:true},
     user:{type:mongoose.Schema.Types.ObjectId, ref:"User", required:true},
    invoiceNumber:{type:Number, required:true},
    salesDate:{type:Date, required:true},
    paymentMethod:{type:String, required:true},
    totalAmountPaid:{type:Number, required:true}
});
export default mongoose.model("Sale", saleSchema);