2016-08-08 07:08:40 -04:00
|
|
|
schools = new Mongo.Collection("Schools");
|
|
|
|
|
classes = new Mongo.Collection("Classes");
|
|
|
|
|
work = new Mongo.Collection("Work");
|
2016-08-20 22:38:01 -04:00
|
|
|
requests = new Mongo.Collection("Requests");
|
2016-11-03 02:05:43 -04:00
|
|
|
admins = Meteor.users;
|
2016-11-07 21:34:30 -05:00
|
|
|
teachers = new Mongo.Collection("Teachers");
|
2016-08-08 07:08:40 -04:00
|
|
|
|
|
|
|
|
schools.schema = new SimpleSchema({
|
2016-11-07 21:34:30 -05:00
|
|
|
name: {type: String}
|
2016-08-08 07:08:40 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
classes.schema = new SimpleSchema({
|
2016-08-13 17:36:35 -04:00
|
|
|
school: {type: String},
|
|
|
|
|
//icon: {type: String},
|
|
|
|
|
name: {type: String, label: "Class Name"},
|
|
|
|
|
hour: {type: String, optional: true},
|
|
|
|
|
teacher: {type: String, optional: true},
|
|
|
|
|
admin: {type: String, optional: true},
|
|
|
|
|
status: {type: Boolean, defaultValue: false},
|
2016-10-22 16:10:52 -04:00
|
|
|
code: {type: String, optional: true},
|
2016-08-13 17:36:35 -04:00
|
|
|
privacy: {type: Boolean},
|
|
|
|
|
category: {type: String},
|
|
|
|
|
moderators: {type: [String], optional: true},
|
2016-08-16 20:46:38 -04:00
|
|
|
banned: {type: [String], optional: true},
|
2016-08-15 13:48:00 -04:00
|
|
|
subscribers: {type: [String], optional: true}
|
2016-08-08 07:08:40 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
work.schema = new SimpleSchema({
|
2016-08-13 17:36:35 -04:00
|
|
|
name: {type: String},
|
|
|
|
|
class: {type: String},
|
|
|
|
|
dueDate: {type: Date},
|
|
|
|
|
description: {type: String, optional: true},
|
|
|
|
|
creator: {type: String},
|
2016-10-28 23:23:07 -04:00
|
|
|
comments: {type: [Object], blackbox: true, optional: true},
|
2016-08-13 17:36:35 -04:00
|
|
|
confirmations: {type: [String], optional: true},
|
|
|
|
|
reports: {type: [String], optional: true},
|
|
|
|
|
attachments: {type: [String], optional: true},
|
|
|
|
|
done: {type: [String], optional: true},
|
|
|
|
|
type: {type: String}
|
2016-08-12 20:42:29 -04:00
|
|
|
});
|
2016-08-20 22:38:01 -04:00
|
|
|
|
|
|
|
|
requests.schema = new SimpleSchema({
|
|
|
|
|
requestor: {type: String},
|
|
|
|
|
request: {type: String},
|
2016-11-03 02:05:43 -04:00
|
|
|
timeRequested: {type: Date},
|
|
|
|
|
'info.users': {type: [Object], label: "Debug Users"},
|
|
|
|
|
'info.userInfo': {type: Object, label: "Debug User Info"},
|
|
|
|
|
'info.userClasses': {type: [Object], label: "Debug User Classes"}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
userSchema = new SimpleSchema({
|
|
|
|
|
'profile.name': {type: String, label: "Name"},
|
|
|
|
|
'profile.grade': {type: Number, label: "Graduation Year"},
|
|
|
|
|
'profile.school': {type: String, label: "School"},
|
|
|
|
|
'services.google.email': {type: String, label: "Email"},
|
|
|
|
|
'services.google.picture': {type: String, label: "Icon URL"},
|
|
|
|
|
'profile.classes': {type: [String], label: "Classes"}
|
2016-08-20 22:38:01 -04:00
|
|
|
});
|
2016-10-21 03:03:11 -04:00
|
|
|
|
2016-11-07 21:34:30 -05:00
|
|
|
teachers.schema = new SimpleSchema({
|
|
|
|
|
name: {type: String},
|
|
|
|
|
school: {type: String}
|
|
|
|
|
});
|
|
|
|
|
|
2016-10-21 20:35:56 -04:00
|
|
|
schools.attachSchema(schools.schema);
|
|
|
|
|
classes.attachSchema(classes.schema);
|
|
|
|
|
work.attachSchema(work.schema);
|
|
|
|
|
requests.attachSchema(requests.schema);
|
2016-11-07 21:34:30 -05:00
|
|
|
teachers.attachSchema(teachers.schema);
|