import { listItemSchema, levelSchema } from './_shared.mjs'

/**
 * DataModel pour les items de type "evolution" (évolutions du personnage).
 * @augments {foundry.abstract.TypeDataModel}
 */
export default class VermineEvolutionData extends foundry.abstract.TypeDataModel {
  /** @override */
  static LOCALIZATION_PREFIXES = ["VERMINE.item.evolution"]

  /** @override */
  static defineSchema() {
    const fields = foundry.data.fields
    return {
      ...listItemSchema(),
      level: levelSchema(1, 1, 4),
      mutation: new fields.BooleanField({ required: true, initial: false })
    }
  }
}
