
package dev.sonpx.loyalty.mcp.reward.model;




import dev.sonpx.loyalty.mcp.enums.CounterEntity;
import dev.sonpx.loyalty.mcp.enums.CounterPeriod;
import dev.sonpx.loyalty.mcp.reward.enums.CounterCountType;
import dev.sonpx.loyalty.mcp.reward.enums.CounterResetType;
import dev.sonpx.loyalty.mcp.reward.enums.CounterUpdateType;
import dev.sonpx.loyalty.mcp.reward.enums.LateValuePosting;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.time.LocalDate;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by SonPhung on Monday, 20-Jul-2026
 */
@Getter
@Setter
public class CounterDefinition extends Fw {

    @NotBlank
    @Size(max = 10)
    private String counterId;

    @NotBlank
    @Size(max = 50)
    private String counterName;

    @Size(max = 200)
    private String description;

    @NotNull
    private LocalDate effectiveFrom;

    @NotNull
    private LocalDate effectiveTo;

    @NotNull
    private CounterEntity entity; // counter level

    @NotNull
    private CounterPeriod bucketPeriodUnit; // counter period

    private LocalDate bucketEndDate; // fixedDate;

    private Integer bucketPeriodDuration; // parameterForPeriod;

    @NotNull
    private CounterCountType whatToCount; // counts;

    @NotNull
    private CounterResetType resetType;

    @NotNull
    private Double resetValue;

    private Boolean firstDateType;

    private LocalDate firstStartDate;

    @NotNull
    private CounterUpdateType updateStateWhen; // stateCounter;

    @NotNull
    private LateValuePosting lateValuePosting;
}
