/**
 * Data model pour les figurants
 */
export default class FigurantDataModel extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    const fields = foundry.data.fields;
    return {
      biodata: new fields.SchemaField({
        age: new fields.NumberField({ initial: 0, integer: true }),
        taille: new fields.StringField({ initial: "" }),
        description: new fields.HTMLField({ initial: "" }),
        poids: new fields.NumberField({ initial: 0, integer: true }),
        notes: new fields.HTMLField({ initial: "" })
      }),
      attributs: new fields.SchemaField({
        conflit: new fields.SchemaField({
          values: new fields.SchemaField({
            offensif: new fields.SchemaField({
              label: new fields.StringField({ initial: "Offensif" }),
              value: new fields.NumberField({ initial: 0, integer: true }),
              degats: new fields.BooleanField({ initial: true })
            }),
            defensif: new fields.SchemaField({
              label: new fields.StringField({ initial: "Défensif" }),
              value: new fields.NumberField({ initial: 0, integer: true })
            })
          }),
          rollable: new fields.BooleanField({ initial: false }),
          label: new fields.StringField({ initial: "Conflit" })
        }),
        relationnel: new fields.SchemaField({
          values: new fields.SchemaField({
            defaut: new fields.SchemaField({
              value: new fields.NumberField({ initial: 0, integer: true })
            })
          }),
          rollable: new fields.BooleanField({ initial: true }),
          label: new fields.StringField({ initial: "Relationnel" })
        }),
        physique: new fields.SchemaField({
          values: new fields.SchemaField({
            defaut: new fields.SchemaField({
              value: new fields.NumberField({ initial: 0, integer: true })
            })
          }),
          rollable: new fields.BooleanField({ initial: true }),
          label: new fields.StringField({ initial: "Physique" })
        }),
        mental: new fields.SchemaField({
          values: new fields.SchemaField({
            defaut: new fields.SchemaField({
              value: new fields.NumberField({ initial: 0, integer: true })
            })
          }),
          rollable: new fields.BooleanField({ initial: true }),
          label: new fields.StringField({ initial: "Mental" })
        }),
        mystique: new fields.SchemaField({
          values: new fields.SchemaField({
            actif: new fields.SchemaField({
              label: new fields.StringField({ initial: "Actif" }),
              value: new fields.NumberField({ initial: 0, integer: true })
            }),
            passif: new fields.SchemaField({
              label: new fields.StringField({ initial: "Passif" }),
              value: new fields.NumberField({ initial: 0, integer: true })
            })
          }),
          rollable: new fields.BooleanField({ initial: false }),
          label: new fields.StringField({ initial: "Mystique" })
        }),
        vitalite: new fields.SchemaField({
          values: new fields.SchemaField({
            defaut: new fields.SchemaField({
              value: new fields.NumberField({ initial: 0, integer: true })
            })
          }),
          rollable: new fields.BooleanField({ initial: false }),
          label: new fields.StringField({ initial: "Vitalité" })
        })
      }),
      etat: new fields.SchemaField({
        etat: new fields.StringField({ initial: "fringant" })
      })
    };
  }
}
