Files
DiceCloud/app/imports/api/properties/Features.js
Stefan Zermatten 1b5bb981e9 Updated viewers
Action, classlevel, constant, container, damage multiplier, damage, 
effect, feature, folder, item
2021-10-19 17:19:35 +02:00

37 lines
914 B
JavaScript

import SimpleSchema from 'simpl-schema';
import STORAGE_LIMITS from '/imports/constants/STORAGE_LIMITS.js';
import createPropertySchema from '/imports/api/properties/subSchemas/createPropertySchema.js';
let FeatureSchema = createPropertySchema({
name: {
type: String,
max: STORAGE_LIMITS.name,
optional: true,
},
summary: {
type: 'inlineCalculationFieldToCompute',
optional: true,
},
description: {
type: 'inlineCalculationFieldToCompute',
optional: true,
},
});
let ComputedOnlyFeatureSchema = createPropertySchema({
summary: {
type: 'computedOnlyInlineCalculationField',
optional: true,
},
description: {
type: 'computedOnlyInlineCalculationField',
optional: true,
},
});
const ComputedFeatureSchema = new SimpleSchema()
.extend(FeatureSchema)
.extend(ComputedOnlyFeatureSchema);
export { FeatureSchema, ComputedFeatureSchema, ComputedOnlyFeatureSchema }