package com.ruoyi.clock.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 活动信息业务对象 tb_activity
 *
 * @author pengc
 * @date 2026-03-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("活动信息业务对象")
public class ActivityBo extends BaseEntity {

    /**
     * 活动id
     */
    @ApiModelProperty(value = "活动id", required = true)
    @NotNull(message = "活动id不能为空", groups = { EditGroup.class })
    private Long activityId;

    /**
     * 活动名称
     */
    @ApiModelProperty(value = "活动名称", required = true)
    @NotBlank(message = "活动名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String activityName;

    /**
     * 活动类型 0晒单打卡 1销售pk
     */
    @ApiModelProperty(value = "活动类型 0晒单打卡 1销售pk", required = true)
    @NotNull(message = "活动类型 0晒单打卡 1销售pk不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer type;

    @ApiModelProperty(value = "代理商信息", required = true)
    private List<AgentBo> agentList;

    /**
     * 开始日期
     */
    @ApiModelProperty(value = "开始日期", required = true)
    @NotNull(message = "开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /**
     * 结束日期
     */
    @ApiModelProperty(value = "结束日期", required = true)
    @NotNull(message = "结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    /**
     * 活动图片
     */
    @ApiModelProperty(value = "活动图片", required = true)
    // @NotBlank(message = "活动图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<String> image;


    @ApiModelProperty(value = "产品信息", required = true)
    private List<ActivityProductBo> productList;

    /**
     * 单位 0 盒 1 支
     */
    @ApiModelProperty(value = "单位 0 盒 1 支", required = true)
    //@NotNull(message = "单位 0 盒 1 支不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer unit;

    /**
     * 活动规则
     */
    @ApiModelProperty(value = "活动规则", required = true)
    //@NotBlank(message = "活动规则不能为空", groups = { AddGroup.class, EditGroup.class })
    private String activityRules;

    /**
     * 活动奖励
     */
    @ApiModelProperty(value = "活动奖励", required = true)
    //@NotBlank(message = "活动奖励不能为空", groups = { AddGroup.class, EditGroup.class })
    private String activityRewards;

    /**
     * 活动状态 0正常 1停用
     */
    @ApiModelProperty(value = "活动状态 0正常 1停用", required = true)
    //@NotNull(message = "活动状态 0正常 1停用不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    @ApiModelProperty(value = "产品名称", required = true)
    private String productName;

    @ApiModelProperty(value = "是否进行中")
    private Boolean progressStatus = false;

}
