package co.yixiang.yshop.module.shop.controller.admin.popup.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;

/**
 * 弹窗 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class PopupBaseVO {

    @Schema(description = "名称", required = true, example = "赵六")
    @NotNull(message = "名称不能为空")
    private String name;

    @Schema(description = "开始时间", required = true)
    @NotNull(message = "开始时间不能为空")
    private LocalDateTime startTime;

    @Schema(description = "结束时间", required = true)
    @NotNull(message = "结束时间不能为空")
    private LocalDateTime endTime;

    @Schema(description = "弹窗图", required = true)
    @NotNull(message = "弹窗图不能为空")
    private String popupImage;

    @Schema(description = "按钮图", required = true)
    @NotNull(message = "按钮图不能为空")
    private String buttonImage;

    @Schema(description = "跳转类型：0、不跳转，1、商品，2、分类，3、优惠券，4、小程序", required = true, example = "2")
    @NotNull(message = "跳转类型不能为空")
    private Integer type;

    @Schema(description = "链接")
    private String link;

    @Schema(description = "状态 0-关闭 1-开启")
    private Integer state;

}
