package com.ruoyi.bst.ad.domain;

import com.ruoyi.common.constants.DictType;
import com.ruoyi.common.core.validate.ValidGroup;
import com.ruoyi.common.valid.DictValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.interfaces.LogBizParam;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 广告对象 bst_ad
 *
 * @author ruoyi
 * @date 2025-04-01
 */
@Data
public class Ad extends BaseEntity implements LogBizParam
{
    private static final long serialVersionUID = 1L;

    private Long adId;

    @Excel(name = "所属:0-管理员 1-商户")
    @ApiModelProperty("所属:0-管理员 1-商户")
    private String belong;

    @Excel(name = "广告类型 1：活动推广")
    @ApiModelProperty("广告类型 1：活动推广")
    private String type;

    @ApiModelProperty("广告图片")
    @NotBlank(message = "广告图片不能为空",groups = {ValidGroup.Create.class})
    private String picture;

    @Excel(name = "运营商id")
    @ApiModelProperty("运营商id")
    private Long storeId;

    @Excel(name = "运营区id")
    @ApiModelProperty("运营区id")
    private Long areaId;

    @Excel(name = "广告状态")
    @ApiModelProperty("广告状态")
    @NotBlank(message = "广告状态不能为空", groups = {ValidGroup.Create.class})
    private String status;

    @Excel(name = "跳转链接")
    @ApiModelProperty("跳转链接")
    @NotBlank(message = "跳转链接不能为空", groups = {ValidGroup.Create.class})
    private String url;

    @Excel(name = "跳转类型，1外链跳转，2站内跳转")
    @ApiModelProperty("跳转类型，1外链跳转，2站内跳转")
    @NotBlank(message = "跳转类型不能为空", groups = {ValidGroup.Create.class})
    @DictValid(type = DictType.URL_TYPE, message = "非法的跳转类型")
    private String urlType;

    @Excel(name = "审核状态")
    @ApiModelProperty("审核状态")
    private String auditStatus;

    @Excel(name = "审核人")
    @ApiModelProperty("审核人")
    private Long verifyBy;

    @Excel(name = "审核结束时间")
    @ApiModelProperty("审核结束时间")
    private LocalDateTime verifyEndTime;

    @Excel(name = "审核备注")
    @ApiModelProperty("审核备注")
    private String verifyRemark;

    @Override
    public Object logBizId() {
        return adId;
    }

}
