Advertisement
Fahim_7861

Untitled

Jun 19th, 2021
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. const mongoose = require("mongoose");
  2.  
  3. const orderHistoryShema = mongoose.Schema({
  4.  
  5. userInfo : {
  6. type : mongoose.Types.ObjectId,
  7. ref : "User",
  8.  
  9. },
  10.  
  11. orderInfo : {
  12.  
  13. type : Object,
  14. required : true
  15.  
  16. },
  17. status : {
  18. type : String,
  19. enum : ["delivered","pending"]
  20. },
  21.  
  22. date : {
  23.  
  24. type : String,
  25.  
  26. default: Date.now
  27.  
  28. }
  29.  
  30.  
  31. });
  32.  
  33. module.exports = orderHistoryShema;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement