Advertisement
Fahim_7861

Untitled

Jun 19th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. const mongoose = require("mongoose");
  2.  
  3. const userSchema = mongoose.Schema({
  4. name: {
  5. type: String,
  6. required: true,
  7. },
  8. email: {
  9. type: String,
  10. required: true,
  11. },
  12.  
  13. pic : {
  14. type : String,
  15. required : true,
  16.  
  17. },
  18. status: {
  19. type: String,
  20. enum: ["active", "inactive"],
  21. },
  22. token : {
  23. type : String ,
  24.  
  25. required : true,
  26.  
  27. },
  28. Address : String,
  29.  
  30. orderHistory: [
  31. {
  32. type: mongoose.Types.ObjectId,
  33. ref: "OrderHistory"
  34. }
  35. ]
  36. });
  37.  
  38. module.exports = userSchema;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement