package jnpf.cultivate.v2.util;

import lombok.Getter;
import lombok.Setter;

import java.util.Collections;
import java.util.List;

/**
 * 考试变更结果
 *
 * @author yanwenfu
 * @create 2026-04-22
 */
@Getter
@Setter
public class ExamChangeResult {

    /** 是否有任何变更 */
    private boolean changed;

    /** 基础信息是否变更 */
    private boolean examChanged;

    /** 抽题规则是否变更 */
    private boolean ruleChanged;

    /** 具体变更字段 */
    private List<String> changedFields;

    public static ExamChangeResult noChange() {
        ExamChangeResult r = new ExamChangeResult();
        r.changed = false;
        r.changedFields = Collections.emptyList();
        return r;
    }

    public void markChanged(String field) {
        this.changed = true;
        this.changedFields.add(field);
    }
}
