export default class PersonnageDataModel extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    const fields = foundry.data.fields
    return {
      biodata: new fields.SchemaField({
        age: new fields.NumberField({ initial: 20, integer: true, min: 0 }),
        sexe: new fields.StringField({ initial: "" }),
        motscles: new fields.StringField({ initial: "" }),
        description: new fields.HTMLField({ initial: "" }),
        notes: new fields.HTMLField({ initial: "" }),
        gmnotes: new fields.HTMLField({ initial: "" }),
      }),
      references: new fields.SchemaField({
        raceId: new fields.StringField({ initial: "" }),
        tribuId: new fields.StringField({ initial: "" }),
        metierId: new fields.StringField({ initial: "" }),
        compagnieId: new fields.StringField({ initial: "" }),
      }),
      size: new fields.SchemaField({
        value: new fields.NumberField({ initial: 2, integer: true, min: 1, max: 4 }),
        label: new fields.StringField({ initial: "" }),
      }),
      profils: new fields.SchemaField({
        artiste: new fields.NumberField({ initial: 0, integer: true }),
        athlete: new fields.NumberField({ initial: 0, integer: true }),
        chasseur: new fields.NumberField({ initial: 0, integer: true }),
        faiseur: new fields.NumberField({ initial: 0, integer: true }),
        forceNature: new fields.NumberField({ initial: 0, integer: true }),
        guerrier: new fields.NumberField({ initial: 0, integer: true }),
        mystique: new fields.NumberField({ initial: 0, integer: true }),
        ombre: new fields.NumberField({ initial: 0, integer: true }),
        savant: new fields.NumberField({ initial: 0, integer: true }),
      }),
      songes: new fields.SchemaField({
        value: new fields.NumberField({ initial: 1, integer: true, min: 0 }),
        points: new fields.NumberField({ initial: 2, integer: true, min: 0 }),
        max: new fields.NumberField({ initial: 2, integer: true, min: 0 }),
        debt: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
        xpCredit: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
      }),
      cauchemar: new fields.SchemaField({
        value: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
        points: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
        max: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
        debt: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
        xpCredit: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
      }),
      hp: new fields.SchemaField({
        value: new fields.NumberField({ initial: 8, integer: true, min: 0 }),
        max: new fields.NumberField({ initial: 8, integer: true, min: 0 }),
        bonus: new fields.NumberField({ initial: 0, integer: true }),
      }),
      experience: new fields.SchemaField({
        value: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
      }),
      money: new fields.SchemaField({
        ecorces: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
      }),
      reserves: new fields.SchemaField({
        songesThreads: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
        cauchemarThreads: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
        emptyGlobes: new fields.NumberField({ initial: 0, integer: true, min: 0 }),
      }),
      flagsNarratifs: new fields.SchemaField({
        ombreDuTourment: new fields.BooleanField({ initial: false }),
        isCaptain: new fields.BooleanField({ initial: false }),
      }),
      visions: new fields.HTMLField({ initial: "" }),
    }
  }
}
