import { BaseItemDataModel } from "./base-item.mjs"

export default class CompetenceDataModel extends BaseItemDataModel {
  static defineSchema() {
    const fields = foundry.data.fields
    return {
      ...this.defineBaseSchema(),
      key: new fields.StringField({ initial: "" }),
      profileKey: new fields.StringField({ initial: "" }),
      base: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
      closed: new fields.BooleanField({ initial: false }),
      domainSkill: new fields.BooleanField({ initial: false }),
      domains: new fields.ArrayField(new fields.StringField(), { initial: [] }),
      fixedDomains: new fields.ArrayField(new fields.StringField(), { initial: [] }),
      exampleDomains: new fields.ArrayField(new fields.StringField(), { initial: [] }),
    }
  }
}
