package com.ga.api.service.regulatory;

import java.math.BigDecimal;

public record ViolationResult(
        boolean violated,
        BigDecimal currentTotal,
        BigDecimal limitAmount,
        String limitType,
        String message
) {
    public static ViolationResult ok(BigDecimal currentTotal, BigDecimal limitAmount, String limitType) {
        return new ViolationResult(false, currentTotal, limitAmount, limitType, null);
    }

    public static ViolationResult violated(BigDecimal currentTotal, BigDecimal limitAmount, String limitType, String message) {
        return new ViolationResult(true, currentTotal, limitAmount, limitType, message);
    }
}
