/**
 * Data model pour les compétences
 */
export default class CompetenceDataModel extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    const fields = foundry.data.fields;
    return {
      categorie: new fields.StringField({ initial: "utile" }),
      profil: new fields.StringField({ initial: "aventurier" }),
      niveau: new fields.NumberField({ initial: 0, integer: true }),
      nomniveau: new fields.SchemaField({
        1: new fields.StringField({ initial: "" }),
        2: new fields.StringField({ initial: "" }),
        3: new fields.StringField({ initial: "" }),
        4: new fields.StringField({ initial: "" })
      }),
      nomniveausouffle: new fields.SchemaField({
        soufflecombat: new fields.SchemaField({
          1: new fields.StringField({ initial: "" }),
          2: new fields.StringField({ initial: "" }),
          3: new fields.StringField({ initial: "" }),
          4: new fields.StringField({ initial: "" })
        }),
        soufflemouvement: new fields.SchemaField({
          1: new fields.StringField({ initial: "" }),
          2: new fields.StringField({ initial: "" }),
          3: new fields.StringField({ initial: "" }),
          4: new fields.StringField({ initial: "" })
        }),
        souffleesprit: new fields.SchemaField({
          1: new fields.StringField({ initial: "" }),
          2: new fields.StringField({ initial: "" }),
          3: new fields.StringField({ initial: "" }),
          4: new fields.StringField({ initial: "" })
        })
      }),
      predilection: new fields.BooleanField({ initial: false }),
      specialites: new fields.ArrayField(new fields.ObjectField(), { initial: [] }),
      ismagie: new fields.BooleanField({ initial: false }),
      description: new fields.HTMLField({ initial: "" })
    };
  }
}
