collections.js 591 B

1234567891011121314151617181920212223242526
  1. // This collection stores all the documents.
  2. // Note: not Documents, but this.Documents, because of the editing package (?)
  3. this.Documents = new Mongo.Collection("documents");
  4. // This collection stores sets of users that are editing documents.
  5. EditingUsers = new Mongo.Collection("editingUsers");
  6. Comments = new Mongo.Collection("comments");
  7. Comments.attachSchema(new SimpleSchema({
  8. title: {
  9. type: String,
  10. label: "Title",
  11. max: 200
  12. },
  13. body: {
  14. type: String,
  15. label: "Comment",
  16. max: 1000
  17. },
  18. docid: {
  19. type: String
  20. },
  21. owner: {
  22. type: String
  23. }
  24. }));