import { ItemBaseData } from "./base-item.mjs";
const fields = foundry.data.fields;

export default class CareerData extends ItemBaseData {
    static defineSchema() {
        const schema = super.defineSchema();
        schema.difficulty = new fields.NumberField({ required: true, initial: 0, min: 0, integer: true });
        schema.damage = new fields.StringField({ required: false, blank: true });
        schema.interval = new fields.StringField({ required: false, blank: true });
        schema.assignment = new fields.StringField({ required: false, blank: true });
        schema.terms = new fields.NumberField({ required: false, initial: 0, min: 0, integer: true });
        schema.rank = new fields.NumberField({ required: false, initial: 0, min: 0, integer: true });
        schema.events = new fields.ArrayField(
            new fields.SchemaField({
                age: new fields.NumberField({ required: false, integer: true }),
                description: new fields.StringField({ required: false, blank: true, trim: true })
            })
        );
        return schema;
    }
}
