51 lines
1.2 KiB
JavaScript
Raw Normal View History

2016-08-01 19:30:32 +08:00
import { Meteor } from 'meteor/meteor';
2016-08-07 00:32:19 -04:00
import { Mongo } from 'meteor/mongo';
2016-08-01 19:30:32 +08:00
2016-08-07 15:03:24 -04:00
schools = new Mongo.Collection("Schools");
classes = new Mongo.Collection("Classes");
2016-08-07 15:34:41 -04:00
work = new Mongo.Collection("Work");
2016-08-07 15:03:24 -04:00
schools.schema = new SimpleSchema({
name: {type: String},
aliases: {type: [String]}
});
classes.schema = new SimpleSchema({
school: {type: String},
//icon: {type: String},
name: {type: String, label: "Class Name"},
2016-08-07 15:21:39 -04:00
hour: {type: String, optional: true},
teacher: {type: String, optional: true},
2016-08-07 15:07:38 -04:00
status: {type: Boolean, defaultValue: false},
2016-08-07 15:03:24 -04:00
code: {type: String, optional: true},
privacy: {type: String},
category: {type: String},
2016-08-07 15:21:39 -04:00
moderators: {type: [String]},
2016-08-07 15:03:24 -04:00
banned: {type: [String]},
blockEdit: {type: [String]},
2016-08-07 15:21:39 -04:00
admin: {type: String}
2016-08-07 15:03:24 -04:00
});
2016-08-07 15:21:39 -04:00
work.schema = new SimpleSchema({
2016-08-07 15:03:24 -04:00
class: {type: String},
dueDate: {type: Date},
aliases: {type: [String]},
submittor: {type: String},
confirmations: {type: [String]},
reports: {type: [String], optional: true},
attachments: {type: [String], optional: true},
done: {type: [String], optional: true}
});
2016-08-07 15:21:39 -04:00
// Meteor.methods({
// createClass: function(client) {
// if
// }
// });
2016-08-01 19:30:32 +08:00
Meteor.startup(() => {
Meteor.methods({
})
2016-08-07 00:32:19 -04:00
});