import { htmlField } from "./shared.mjs"

export default class MGNEParty extends foundry.abstract.TypeDataModel {
  static defineSchema() {
    const fields = foundry.data.fields

    return {
      memberRefs: new fields.ArrayField(
        new fields.SchemaField({
          id: new fields.StringField({ required: true, nullable: false, blank: false }),
        })
      ),
      credits: new fields.NumberField({ required: true, nullable: false, integer: true, initial: 0, min: 0 }),
      notes: htmlField(""),
    }
  }

  /** @override */
  static LOCALIZATION_PREFIXES = ["MGNE.Party"]
}
