package com.sqx.modules.activity.dto;

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 加入活动dto
 *
 * @author : codingliang
 * @date : 2024-06-19 11:05
 */
@Data
public class JoinActivityDTO {

    @ApiModelProperty(value = "活动id", required = true)
    @NotNull(message = "活动id不能为空")
    private Long activityId;

    @ApiModelProperty(value = "店铺id集合", required = true)
    @NotNull(message = "店铺id集合不能为空")
    @Size(min = 1, message = "店铺id集合不能为空")
    private List<Long> shopIds;

    @ApiModelProperty(value = "适用类型;1无限制、2仅针对第一次下单", required = true)
    @NotBlank(message = "适用类型不能为空")
    @Pattern(regexp = "(1|2)", message = "适用类型只能为1或2")
    private String suitType;

    @ApiModelProperty(value = "限制类型;1无限制、2数量限制", required = true)
    @NotBlank(message = "限制类型不能为空")
    @Pattern(regexp = "(1|2)", message = "限制类型只能为1或2")
    private String limitType;

    @ApiModelProperty(value = "限制数量;limit为2时该值不能为空，每天限制使用的数量")
    private Integer limitValue;
}
