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


import com.pig4cloud.pig.marketing.api.valid.ValueRange;
import io.swagger.v3.oas.annotations.media.Schema;
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-29
 * @description: 域名相关DTO的公共父类
 */
@Data
public class BaseDomainDTO implements Serializable {
	@Serial
	private static final long serialVersionUID = 1L;

	@NotNull(message = "来源类型不能为空")
	@ValueRange(values = {1, 2}, message = "来源类型不合法（1-来自分组,2-具体域名）")
	@Schema(description = "来源类型,1-来自分组,2-具体域名")
	private Integer sourceType;

	@Schema(description = "分组ID")
	private Long groupId;

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

	@Schema(description = "域名")
	@Size(max = 255, message = "域名长度不能超过255")
	private String domain;

}
