27 lines
1.2 KiB
JavaScript
27 lines
1.2 KiB
JavaScript
import { TEMPLATE_DESCRIPTION } from "../common/_module.mjs";
|
|
import { TEMPLATE_TEMPOREL } from "../common/_module.mjs";
|
|
import { INTEGER, STRING } from "../common/field-types.mjs";
|
|
|
|
const fields = foundry.data.fields;
|
|
|
|
export default class RdDModelMaladie extends foundry.abstract.TypeDataModel {
|
|
static defineSchema() {
|
|
return Object.assign({},
|
|
TEMPLATE_DESCRIPTION.fields(),
|
|
TEMPLATE_TEMPOREL.fields(),
|
|
{
|
|
identifie: new fields.BooleanField({ label: "Identifiée", initial: false }),
|
|
malignite: new fields.NumberField({ label: "Malignité", initial: 0, ...INTEGER }),
|
|
incubation: new fields.StringField({ label: "Incubation", initial: "", ...STRING }),
|
|
periode: new fields.SchemaField({
|
|
unite: new fields.StringField({ label: "Unité", initial: "", ...STRING }),
|
|
nombre: new fields.NumberField({ label: "Nombre", initial: 0, ...INTEGER }),
|
|
}),
|
|
remedesconnus: new fields.BooleanField({ label: "Remèdes connus", initial: false }),
|
|
remedes: new fields.StringField({ label: "Remèdes", initial: "", ...STRING }),
|
|
dommages: new fields.StringField({ label: "Dégâts", initial: "", ...STRING }),
|
|
}
|
|
)
|
|
}
|
|
}
|