Datamodel + Appv2 migration, WIP

This commit is contained in:
2026-01-12 23:32:51 +01:00
parent 2abd2c881a
commit ed76a49e7d
27 changed files with 1695 additions and 1494 deletions

22
module/models/feature.mjs Normal file
View File

@@ -0,0 +1,22 @@
/**
* Data model for Feature items
*/
export default class BoLFeatureDataModel extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
const requiredInteger = { required: true, nullable: false, integer: true };
return {
// Base fields
category: new fields.StringField({ initial: null }),
subtype: new fields.StringField({ initial: "default" }),
description: new fields.HTMLField({ initial: "" }),
properties: new fields.SchemaField({}),
// Feature-specific fields
rank: new fields.NumberField({ ...requiredInteger, initial: 0 })
};
}
static LOCALIZATION_PREFIXES = ["BOL.Feature"];
}