Updated simpl-schema and collection2, started untangling the mess that made

This commit is contained in:
Stefan Zermatten
2018-10-12 13:38:51 +02:00
parent e3065f089f
commit 53a1137848
23 changed files with 337 additions and 138 deletions

View File

@@ -1,17 +1,14 @@
Notes = new Mongo.Collection("notes");
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
Schemas.Note = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true, trim: false},
description: {type: String, optional: true, trim: false},
color: {
type: String,
allowedValues:_.pluck(colorOptions, "key"),
defaultValue: "q",
},
});
Notes.attachSchema(Schemas.Note);
Attributes.attachSchema(ColorSchema);
Notes.attachBehaviour("softRemovable");