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

const fields = foundry.data.fields;

export default class RdDModelRecetteCuisine extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    return Object.assign({},
      TEMPLATE_DESCRIPTION.fields(),
      {
        niveau: new fields.NumberField({ label: "Niveau", initial: 0, integer: true, min: 0 }),
        ingredients: new fields.HTMLField({ label: "Ingrédients", ...HTMLSTRING }),
        duree: new fields.StringField({ label: "Durée", initial: "", ...STRING }),
        sust: new fields.NumberField({ label: "Sust", initial: 0, ...INTEGER }),
        exotisme: new fields.NumberField({ label: "Exotisme", initial: 0, integer: true }),
        reference: new fields.StringField({ label: "Référence / Auteur", initial: "", ...STRING }),
      }
    );
  }
}
