Added schemas for collections
This commit is contained in:
parent
cb50268b23
commit
17106ad3e7
@ -22,3 +22,4 @@ insecure@1.0.7 # Allow all DB writes from clients (for prototypin
|
|||||||
fortawesome:fontawesome
|
fortawesome:fontawesome
|
||||||
session
|
session
|
||||||
proyk:meteor-cookies
|
proyk:meteor-cookies
|
||||||
|
aldeed:simple-schema
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
aldeed:simple-schema@1.5.3
|
||||||
allow-deny@1.0.5
|
allow-deny@1.0.5
|
||||||
autopublish@1.0.7
|
autopublish@1.0.7
|
||||||
autoupdate@1.2.11
|
autoupdate@1.2.11
|
||||||
@ -36,6 +37,7 @@ jquery@1.11.9
|
|||||||
launch-screen@1.0.12
|
launch-screen@1.0.12
|
||||||
livedata@1.0.18
|
livedata@1.0.18
|
||||||
logging@1.1.14
|
logging@1.1.14
|
||||||
|
mdg:validation-error@0.2.0
|
||||||
meteor@1.2.16
|
meteor@1.2.16
|
||||||
meteor-base@1.0.4
|
meteor-base@1.0.4
|
||||||
minifier-css@1.2.13
|
minifier-css@1.2.13
|
||||||
|
|||||||
@ -1,6 +1,42 @@
|
|||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
import { Mongo } from 'meteor/mongo';
|
import { Mongo } from 'meteor/mongo';
|
||||||
|
|
||||||
|
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"},
|
||||||
|
status: {type: boolean, defaultValue: false},
|
||||||
|
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}
|
||||||
|
});
|
||||||
|
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Meteor.methods({
|
Meteor.methods({
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user