Files
hamid.zarghami1@gmail.com e644edbd65 transfer project in github
2024-05-12 15:29:27 +03:30

12 lines
400 B
JavaScript

const mongoose = require('mongoose')
const Cart_ItemSchema = mongoose.Schema({
user_id: {type: mongoose.ObjectId, ref: 'User'},
product_id: {type: mongoose.ObjectId, ref: 'Food'},
branchId: {type: mongoose.ObjectId, ref: 'StoreInfo'},
quantity: Number,
// createdAt : {type : Date , expires : 3600 , default : Date.now()}
})
module.exports = mongoose.model('CartItem', Cart_ItemSchema)