Update and begin work on a new data model

This commit is contained in:
Oliver-Akins 2024-01-07 00:58:05 -07:00
parent 99546cd0e3
commit 25dfe354ea
2 changed files with 16 additions and 2 deletions

View file

@ -2,13 +2,15 @@ export class CommonItemData extends foundry.abstract.DataModel {
static defineSchema() { static defineSchema() {
const fields = foundry.data.fields; const fields = foundry.data.fields;
return { return {
name: fields.HTMLField({ name: fields.StringField({
initial: ``,
blank: true, blank: true,
trim: true, trim: true,
}), }),
cost: fields.NumberField({ cost: fields.NumberField({
initial: null,
nullable: true, nullable: true,
}) }),
}; };
}; };
}; };

View file

@ -0,0 +1,12 @@
export class DescribedItemData extends CommonItemData {
static defineSchema() {
const fields = foundry.data.fields;
return mergeObject(super.defineSchema(), {
description: fields.StringField({
initial: ``,
blank: true,
trim: true,
}),
});
};
};