Guest User

Untitled

a guest
Jan 17th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. user_schema = new app.db.schema(
  2. username: String
  3. email: String
  4. password: String
  5. account:
  6. plan:
  7. type: String
  8. default: "Free"
  9. enum: ["Free", "Bronze", "Silver", "Gold"]
  10. comments: [
  11. title: String
  12. message: String
  13. date_added: Date
  14. ]
  15. )
  16.  
  17. user_schema.path("email").validate((value, respond)->
  18. respond v.check(value).isEmail()
  19. , "Invalid email address")
  20.  
  21. comments: [
  22. title:
  23. type: String
  24. required: true
  25. message:
  26. type: String
  27. required: true
  28. date_added: Date
  29. ]
Add Comment
Please, Sign In to add comment