package dev.fyloz.trial.colorrecipesexplorer.exception;

import dev.fyloz.trial.colorrecipesexplorer.model.Material;
import lombok.Getter;

@Getter
public class TooLowQuantityException extends RuntimeException {

    private Long mixId;
    private Material material;
    private Float storedQuantity;
    private Float requestQuantity;

    private String response;

    public TooLowQuantityException(Long mixId, Material material, Float storedQuantity, Float requestQuantity) {
        this.mixId = mixId;
        this.material = material;
        this.storedQuantity = storedQuantity;
        this.requestQuantity = requestQuantity;

        response = String.format("%s_%s", mixId, material.getId());
    }

}
