var mongoose=require("mongoose");

var productSchema=new mongoose.Schema({
    name: String,
    Sub_item: { type: mongoose.Schema.Types.ObjectId, ref: 'Sub_item' },
    description: String,
    description_blocks: String,
    price: Number,
    old_price: Number,
    in_stock: Boolean,
    images: [Object],//paths
    TTC: Number,
    emails_availability:{type : [String] , default : []},
},
{ timestamps: true }
);


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