package com.sqx.modules.integral.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class IntegralRulesDto {
    
    @ApiModelProperty("积分获取开关 1开、0关")
    @NotBlank(message = "积分获取开关不能为空")
    @Pattern(regexp = "(0|1)", message = "积分获取开关只能为0或1")
    private String flag;

    @ApiModelProperty("积分获取规则金额1")
    @NotBlank(message = "积分获取规则金额1不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "积分获取规则金额只能为数字")
    private String ruleAmount1;

    @ApiModelProperty("积分获取规则积分1")
    @NotBlank(message = "积分获取规则积分1不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "积分获取规则金额只能为数字")
    private String ruleValue1;

    @ApiModelProperty("积分获取二阶段规则金额")
    @NotBlank(message = "积分获取二阶段规则金额不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "积分获取规则金额只能为数字")
    private String ruleMaxAmount;

    @ApiModelProperty("积分获取规则金额2")
    @NotBlank(message = "金额2不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "积分获取规则金额只能为数字")
    private String ruleAmount2;

    @ApiModelProperty("积分获取规则积分2")
    @NotBlank(message = "积分2不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "积分获取规则金额只能为数字")
    private String ruleValue2;

    @ApiModelProperty("积分过期规则（-1为永不过期）")
    @NotBlank(message = "过期天数不能为空")
    private String overdue;

    @ApiModelProperty("单笔订单获取积分上限")
    @NotBlank(message = "积分上限不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "积分获取规则金额只能为数字")
    private String maxIntegral;
}
