Overhauled data models to make actions and libraries more universal
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user