package com.yuchen.saas.message.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 公告/资讯Dto
 * </p>
 *
 * @author caiwq
 * @since 2024-02-23
 */
@Data
@ApiModel(value = "PmgBatNoticeDto对象", description = "公告/资讯Dto")
public class PmgBatNoticeDto {

    /**
     * 主键ID
     */
    @ApiModelProperty(name = "id", value = "主键ID")
    private Long id;
    /**
     * 类型(1:系统公告 2:管理区公告 3:组织公告 4:资讯)
     */
    @ApiModelProperty(name = "type", value = "类型(1:系统公告 2:管理区公告 3:组织公告 4:资讯)")
    @NotNull(message = "类型不能为空")
    private Integer type;
    /**
     * 管理区类型(1:园区 2:停车场 3:充电站)
     */
    @ApiModelProperty(name = "siteType", value = "管理区类型(1:园区 2:停车场 3:充电站)")
    private Integer siteType;
    /**
     * 管理区ID
     */
    @ApiModelProperty(name = "siteId", value = "管理区ID")
    private Long siteId;
    /**
     * 管理区名称
     */
    @ApiModelProperty(name = "siteName", value = "管理区名称")
    private String siteName;
    /**
     * 所属客户ID
     */
    @ApiModelProperty(name = "customerId", value = "所属客户ID")
    private Long customerId;
    /**
     * 公告/资讯类型ID
     */
    @ApiModelProperty(name = "noticeTypeId", value = "公告/资讯类型ID")
    @NotNull(message = "公告/资讯类型ID不能为空")
    private Long noticeTypeId;
    /**
     * 媒体名称
     */
    @ApiModelProperty(name = "mediaName", value = "媒体名称")
    private String mediaName;
    /**
     * 政策级别(1:国家 2:省 3:市 4:区)
     */
    @ApiModelProperty(name = "policyLevel", value = "政策级别(1:国家 2:省 3:市 4:区)")
    private Integer policyLevel;
    /**
     * 政策有效期(1:长期有效 2:自定义时间)
     */
    @ApiModelProperty(name = "policyValidity", value = "政策有效期(1:长期有效 2:自定义时间)")
    private Integer policyValidity;
    /**
     * 政策开始时间
     */
    @ApiModelProperty(name = "policyStartTime", value = "政策开始时间")
    private Date policyStartTime;
    /**
     * 政策结束时间
     */
    @ApiModelProperty(name = "policyEndTime", value = "政策结束时间")
    private Date policyEndTime;
    /**
     * 通知配图
     */
    @ApiModelProperty(name = "noticeImage", value = "通知配图")
    private String noticeImage;
    /**
     * 通知标题
     */
    @ApiModelProperty(name = "noticeTitle", value = "通知标题")
    @NotBlank(message = "通知标题不能为空")
    @Size(max = 100, message = "通知标题不能超出100字符")
    private String noticeTitle;
    /**
     * 通知摘要
     */
    @ApiModelProperty(name = "noticeSummary", value = "通知摘要")
    @Size(max = 2000, message = "通知摘要不能超出2000字符")
    private String noticeSummary;
    /**
     * 详细内容
     */
    @ApiModelProperty(name = "noticeContent", value = "详细内容")
    @NotBlank(message = "详细内容不能为空")
    private String noticeContent;
    /**
     * 通知标签
     */
    @ApiModelProperty(name = "noticeLabel", value = "通知标签")
    private String noticeLabel;
    /**
     * 通知附件
     */
    @ApiModelProperty(name = "noticeFile", value = "通知附件")
    private String noticeFile;
    /**
     * 发布类型(1:自动发布 2:手动发布)
     */
    @ApiModelProperty(name = "publishType", value = "发布类型(1:自动发布 2:手动发布)")
    @NotNull(message = "发布类型不能为空")
    private Integer publishType;
    /**
     * 发布日期
     */
    @ApiModelProperty(name = "publishTime", value = "发布日期")
    private Date publishTime;
    /**
     * 结束日期
     */
    @ApiModelProperty(name = "endTime", value = "结束日期")
    private Date endTime;
    /**
     * 发布平台appId
     */
    @ApiModelProperty(name = "appId", value = "发布平台appId")
    private String appId;
    /**
     * 是否弹窗通知(0:否 1:是)
     */
    @ApiModelProperty(name = "isPopUp", value = "是否弹窗通知(0:否 1:是)")
    private Integer isPopUp;
    /**
     * 弹窗频率(1:发布期间仅弹窗一次 2:发布期间每天进入仅弹窗一次 3:发布期间每次进入都弹窗)
     */
    @ApiModelProperty(name = "popUpFrequency", value = "弹窗频率(1:发布期间仅弹窗一次 2:发布期间每天进入仅弹窗一次 3:发布期间每次进入都弹窗)")
    private Integer popUpFrequency;
    /**
     * 弹窗位置
     */
    @ApiModelProperty(name = "popUpLocation", value = "弹窗位置")
    private Integer popUpLocation;

    /**
     * 通知人员列表
     */
    @ApiModelProperty(name = "userInfoList", value = "通知人员列表")
    private List<UsersInfo> userInfoList = new ArrayList<>();

    @Data
    public static class UsersInfo {
        /**
         * 人员id
         */
        private Long userId;
        /**
         * 手机号
         */
        private String phone;
        /**
         * 姓名
         */
        private String userName;
    }


}
