fixed collections bug
This commit is contained in:
parent
43a4f52334
commit
23675285d2
35
hourglass/collections/main.js
Normal file
35
hourglass/collections/main.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
schools = new Mongo.Collection("Schools");
|
||||||
|
classes = new Mongo.Collection("Classes");
|
||||||
|
work = new Mongo.Collection("Work");
|
||||||
|
|
||||||
|
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"},
|
||||||
|
hour: {type: String, optional: true},
|
||||||
|
teacher: {type: String, optional: true},
|
||||||
|
admin: {type: String, optional: true},
|
||||||
|
status: {type: Boolean, defaultValue: false},
|
||||||
|
code: {type: String, optional: true},
|
||||||
|
privacy: {type: String},
|
||||||
|
category: {type: String},
|
||||||
|
moderators: {type: [String], optional: true},
|
||||||
|
banned: {type: [String], optional: true},
|
||||||
|
blockEdit: {type: [String], optional: true}
|
||||||
|
});
|
||||||
|
|
||||||
|
work.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}
|
||||||
|
});
|
||||||
@ -1,42 +1,6 @@
|
|||||||
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");
|
|
||||||
work = new Mongo.Collection("Work");
|
|
||||||
|
|
||||||
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"},
|
|
||||||
hour: {type: String, optional: true},
|
|
||||||
teacher: {type: String, optional: true},
|
|
||||||
admin: {type: String, optional: true},
|
|
||||||
status: {type: Boolean, defaultValue: false},
|
|
||||||
code: {type: String, optional: true},
|
|
||||||
privacy: {type: String},
|
|
||||||
category: {type: String},
|
|
||||||
moderators: {type: [String], optional: true},
|
|
||||||
banned: {type: [String], optional: true},
|
|
||||||
blockEdit: {type: [String], optional: true}
|
|
||||||
});
|
|
||||||
|
|
||||||
work.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}
|
|
||||||
});
|
|
||||||
|
|
||||||
_uuid4 = function(cc) {
|
_uuid4 = function(cc) {
|
||||||
var rr = Math.random() * 16 | 0;
|
var rr = Math.random() * 16 | 0;
|
||||||
return (cc === 'x' ? rr : (rr & 0x3 | 0x8)).toString(16);
|
return (cc === 'x' ? rr : (rr & 0x3 | 0x8)).toString(16);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user