44 lines
1.1 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");
homework = new Mongo.Collection("Homework");
schools.schema = new SimpleSchema({
name: {type: String},
aliases: {type: [String]}
});
classes.schema = new SimpleSchema({
school: {type: String},
//icon: {type: String},
hour: {type: String},
teacher: {type: String},
name: {type: String, label: "Class Name"},
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},
/*moderators: {type: [String]},
banned: {type: [String]},
blockEdit: {type: [String]},
admin: {type: String}*/
});
homework.schema = new SimpleSchema({
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-01 19:30:32 +08:00
Meteor.startup(() => {
Meteor.methods({
})
2016-08-07 00:32:19 -04:00
});