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

import com.fasterxml.jackson.annotation.JsonFormat;
import dev.sonpx.loyalty.mcp.enums.ExpiryPolicy;
import dev.sonpx.loyalty.mcp.model.AttributeData;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by SonPhung on Thursday, 09-Nov-2023
 */
@Getter
@Setter
public class CampaignFormulaEight extends Fw {

    private ReferenceData attrGroup;

    /**
     * criteria/condition
     */
    @NotNull
    private AttributeData attributeId;

    private String attributeType;

    private String attrVal; // priority

    private String andAttrVal; // used types: number, date

    /**
     * updated values
     */
    private AttributeData setAttributeId;

    private String setAttrValue;

    /**
     * expiring
     */
    private LocalDate fixedExpiryDate;

    private ExpiryPolicy expiryPeriodUnit;

    private Long expiredParam;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Integer dayOfMonth;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Integer monthOfYear;
}
