import { INTEGER, STRING } from "../common/field-types.mjs";

const fields = foundry.data.fields;

export default class RdDModelPossession extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    return {
      typepossession: new fields.StringField({ label: "Type de possession", initial: "", ...STRING }),
      possede: new fields.BooleanField({ label: "Possédé", initial: false }),
      possessionid: new fields.StringField({ label: "ID possession", initial: "", ...STRING }),
      entiteid: new fields.StringField({ label: "ID entité", initial: "", ...STRING }),
      entitetokenid: new fields.StringField({ label: "ID token entité", initial: "", ...STRING }),
      victimeid: new fields.StringField({ label: "ID victime", initial: "", ...STRING }),
      victimetokenid: new fields.StringField({ label: "ID token victime", initial: "", ...STRING }),
      compteur: new fields.NumberField({ label: "Compteur", initial: 0, ...INTEGER }),
      entite: new fields.SchemaField({
        actorid: new fields.StringField({ initial: "", ...STRING }),
        diffLibre: new fields.NumberField({ initial: 0, ...INTEGER }),
        finesse: new fields.BooleanField({ initial: false }),
      }),
      victime: new fields.SchemaField({
        actorid: new fields.StringField({ initial: "", ...STRING }),
        diffLibre: new fields.NumberField({ initial: 0, ...INTEGER }),
        finesse: new fields.BooleanField({ initial: false }),
      }),
    }
  }
}
