package jnpf.attendance.service.filter;

import lombok.Getter;

/**
 * 出勤规则过滤器结果
 *
 * @author yanwenfu
 * @create 2025-09-25
 */
@Getter
public class RuleFilterResult {

    /** 是否保留 */
    private final boolean keep;
    /** 是否终止责任链 */
    private final boolean terminate;

    public RuleFilterResult(boolean keep, boolean terminate) {
        this.keep = keep;
        this.terminate = terminate;
    }

    public static RuleFilterResult keep() {
        return new RuleFilterResult(true, false);
    }

    public static RuleFilterResult discard() {
        return new RuleFilterResult(false, false);
    }

    public static RuleFilterResult terminate() {
        return new RuleFilterResult(false, true);
    }
}
