Denormalised inline calculations to property documents, needs to be referenced by UI still
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import InlineComputationSchema from '/imports/api/properties/subSchemas/InlineComputationSchema.js';
|
||||
|
||||
let NoteSchema = new SimpleSchema({
|
||||
name: {
|
||||
@@ -11,4 +12,24 @@ let NoteSchema = new SimpleSchema({
|
||||
},
|
||||
});
|
||||
|
||||
export { NoteSchema };
|
||||
let ComputedOnlyNoteSchema = new SimpleSchema({
|
||||
|
||||
summaryCalculations: {
|
||||
type: Array,
|
||||
maxCount: 32,
|
||||
},
|
||||
'summaryCalculations.$': InlineComputationSchema,
|
||||
|
||||
descriptionCalculations: {
|
||||
type: Array,
|
||||
maxCount: 32,
|
||||
},
|
||||
'descriptionCalculations.$': InlineComputationSchema,
|
||||
|
||||
});
|
||||
|
||||
const ComputedNoteSchema = new SimpleSchema()
|
||||
.extend(NoteSchema)
|
||||
.extend(ComputedOnlyNoteSchema);
|
||||
|
||||
export { NoteSchema, ComputedNoteSchema, ComputedOnlyNoteSchema, };
|
||||
|
||||
Reference in New Issue
Block a user