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


import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author: lwh
 * @date: 2025-08-31
 * @description: 新增/修改营销规则入参
 */
@Data
@Schema(description = "新增/修改营销规则入参")
public class SaveMktRuleDTO implements Serializable {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "id")
	private Long id;

	@Schema(description = "规则名称")
	@NotBlank(message = "规则名称不能为空")
	private String ruleName;

	@Schema(description = "关键字")
	@NotEmpty(message = "关键字不能为空")
	private List<String> keyword;

	@Schema(description = "ip")
	private List<String> ip;

	@Schema(description = "域名")
	private List<String> domain;

	@Schema(description = "推送内容")
	@NotBlank(message = "推送内容不能为空")
	private String pushContent;

	@Schema(description = "推送类型,true-图片,false-链接")
	@NotNull(message = "推送类型不能为空")
	private Boolean pushType;

	@Schema(description = "推送频率")
	@NotBlank(message = "推送频率不能为空")
	private String pushFrequency;

	@Schema(description = "延迟推送,单位整数秒")
	@NotNull(message = "延迟推送不能为空")
	private Integer delayPush;

	@Schema(description = "推送方式,1-弹出提示,2-打开网址,3-内置浏览器打开网址,4-使用webview打开网址",example = "1")
	@NotNull(message = "推送方式不能为空")
	private String action;

	@Schema(description = "备注")
	private String remark;
}
