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

const fields = foundry.data.fields;

export default class RdDModelOeuvre extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    return Object.assign({},
      TEMPLATE_DESCRIPTION.fields(),
      TEMPLATE_APPRECIABLE.fields(),
      {
        default_carac: new fields.StringField({ label: "Caractéristique par défaut", initial: "", ...STRING }),
        competence: new fields.StringField({ label: "Compétence", initial: "", ...STRING }),
        niveau: new fields.NumberField({ label: "Niveau", initial: 0, ...INTEGER }),
        reference: new fields.StringField({ label: "Référence", initial: "", ...STRING }),
      }
    )
  }
}
