Refactored schemas to make properties all implicitely children

This commit is contained in:
Stefan Zermatten
2019-04-03 12:38:01 +02:00
parent 28ffcc87b4
commit 681e669e76
19 changed files with 37 additions and 62 deletions

View File

@@ -1,5 +1,6 @@
import SimpleSchema from 'simpl-schema';
import SoftRemovableSchema from '/imports/api/parenting/SoftRemovableSchema.js';
import ChildSchema from '/imports/api/parenting/ChildSchema.js';
const PropertySchema = new SimpleSchema({
charId: {
@@ -8,14 +9,14 @@ const PropertySchema = new SimpleSchema({
index: 1,
optional: true,
},
name: {
type: String,
optional: true,
},
enabled: {
type: Boolean,
defaultValue: true,
},
name: {
type: String,
optional: true,
},
order: {
type: SimpleSchema.Integer,
index: true,
@@ -23,5 +24,6 @@ const PropertySchema = new SimpleSchema({
});
PropertySchema.extend(SoftRemovableSchema);
PropertySchema.extend(ChildSchema);
export default PropertySchema;