Overhauled data models to make actions and libraries more universal

This commit is contained in:
Stefan Zermatten
2019-03-12 16:47:20 +02:00
parent febb65a513
commit 94f6631a7d
62 changed files with 1076 additions and 1734 deletions

View File

@@ -1,18 +1,25 @@
import SimpleSchema from 'simpl-schema';
import schema from '/imports/api/schema.js';
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
import PropertySchema from '/imports/api/creature/subSchemas/PropertySchema.js';
let Notes = new Mongo.Collection("notes");
noteSchema = schema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true, trim: false},
description: {type: String, optional: true, trim: false},
let NoteSchema = schema({
name: {
type: String,
optional: true,
},
description: {
type: String,
optional: true,
},
});
Notes.attachSchema(noteSchema);
Notes.attachSchema(ColorSchema);
NoteSchema.extend(ColorSchema);
//Notes.attachBehaviour("softRemovable");
Notes.attachSchema(NoteSchema);
Notes.attachSchema(PropertySchema);
export default Notes;
export { NoteSchema };