
package com.tmerclub.cloud.user.dto;

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

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

/**
 * 弹窗广告DTO
 * @author TRACK
 */
@Data
@ToString
public class CostPerPopupDTO {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "弹窗广告id")
    private Long popupId;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "弹窗名称")
    @NotBlank(message = "弹窗名称不能为空")
    private String popupName;

    @Schema(description = "状态 1.未开始 2.投放中 3.已结束")
    private Integer status;

    @Schema(description = "触发页面类型 1.平台首页 2.会员中心 3.支付成功 4.店铺首页 5.商品详情")
    @NotNull(message = "触发页面类型不能为空")
    private Integer pageType;

    @Schema(description = "弹窗图片")
    @NotBlank(message = "弹窗图片不能为空")
    private String popupPic;

    @Schema(description = "跳转页面")
    @NotBlank(message = "跳转页面不能为空")
    private String jumpUrl;

    @Schema(description = "推送用户类型 0.所有用户 1.免费会员 2.付费会员 3.店铺客户")
    @NotNull(message = "推送用户类型不能为空")
    private Integer userType;

    @Schema(description = "推送开始时间")
    @NotNull(message = "推送开始时间不能为空")
    private Date startTime;

    @Schema(description = "推送结束时间")
    @NotNull(message = "推送结束时间不能为空")
    private Date endTime;

    @Schema(description = "推送频次 0.永久一次 1.每次进入 2.自定义频次")
    @NotNull(message = "推送频次不能为空")
    private Integer pushFrequency;

    @Schema(description = "按x天推送 最小为1 最大为31")
    private Integer dayFrequency;

    @Schema(description = "按周推送 eg. 1,2 周日起始为1")
    private String weekFrequency;

    @Schema(description = "关联商品id列表")
    private List<Long> spuIds;

    @Schema(description = "关联会员等级id列表")
    private List<Long> userLevelIds;

    public CostPerPopupDTO() {
    }

    public CostPerPopupDTO(Long shopId) {
        this.shopId = shopId;
    }

}
