Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mongoose = require("mongoose");
- const userSchema = mongoose.Schema({
- name: {
- type: String,
- required: true,
- },
- email: {
- type: String,
- required: true,
- },
- pic : {
- type : String,
- required : true,
- },
- status: {
- type: String,
- enum: ["active", "inactive"],
- },
- token : {
- type : String ,
- required : true,
- },
- Address : String,
- orderHistory: [
- {
- type: mongoose.Types.ObjectId,
- ref: "OrderHistory"
- }
- ]
- });
- module.exports = userSchema;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement