package com.sqx.modules.activity.dto;

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

 /**
 * 满减优惠活动类型
 * @author : codingliang
 * @date : 2024-6-17
 */
@ApiModel(value = "满减优惠信息")
@Data
public class ActivityOfFullReductionDTO implements Serializable {

    @ApiModelProperty(value = "类型;1金额满减、2金额满折扣", required = true)
    @Pattern(regexp = "(1|2)", message = "满减优惠类型只能为1或2")
    @NotBlank(message = "不能为空")
    private String type;
    
    @ApiModelProperty(value = "折扣内容;如果type为1该值标识为直减金额；如果type为2该值表示折扣比例，取值(0,10)", required = true)
    @NotNull(message = "折扣内容不能为空")
    private Double discountContent;

    @ApiModelProperty(value = "达标金额", required = true)
    @NotNull(message = "达标金额不能为空")
    private Double minAmount;
}