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

const fields = foundry.data.fields;

export default class RdDModelPlante extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    return Object.assign({},
      TEMPLATE_DESCRIPTION.fields(),
      TEMPLATE_INVENTAIRE.fields(),
      TEMPLATE_COMESTIBLE.fields(),
      {
        niveau: new fields.NumberField({ label: "Niveau", initial: 0, ...INTEGER }),
        base: new fields.NumberField({ label: "Base", initial: 0, ...INTEGER }),
        categorie: new fields.StringField({ label: "Catégorie", initial: "", ...STRING }),
      }
    )
  }
}
