package com.pig4cloud.pig.marketing.api.dto.config;


import com.pig4cloud.pig.marketing.api.valid.ValueRange;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author: lwh
 * @date: 2025-07-23
 * @description: 添加营销分组入参
 */
@Data
@Schema(description = "添加营销分组入参")
public class AddMarketingGroupDTO implements Serializable {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "分组名称", example = "default")
	@Size(max = 255, message = "分组名称长度不能超过255")
	@NotEmpty(message = "分组名称不能为空")
	private String groupName;

	@Schema(description = "分组类型,1-ip分组,2-域名分组",example = "1")
	@ValueRange(values = {1, 2}, message = "分组类型值不合法（1-ip分组,2-域名分组）")
	@NotNull(message = "分组类型不能为空")
	private Integer groupType;

	@Schema(description = "备注")
	@Size(max = 255, message = "备注长度不能超过255")
	private String remark;
}
