package com.yuchen.saas.parking.charge.api.dto.charge;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value="查询通知DTO", description="查询通知DTO")
public class SpcNoticeDTO {

    @ApiModelProperty(name = "id", value = "通知id,编辑时必传")
    private Long id;
    @ApiModelProperty(name = "noticeObjectList", value = "公告对象列表（如果为3充电站，则传充电站对象）")
    private List<NoticeObject> noticeObjectList;
    @NotNull(message ="运营商id不能为空")
    @ApiModelProperty(name = "enterpriseId", value = "运营商id")
    private Long enterpriseId;

    @ApiModelProperty(name = "publishStartDate", value = "发布日期")
    private Date publishStartDate;

    @ApiModelProperty(name = "publishEndDate", value = "发布结束日期")
    private Date publishEndDate;

    @NotNull(message ="标题不能为空")
    @ApiModelProperty(name = "title", value = "标题")
    private String title;
    @NotNull(message ="内容类型不能为空")
    @ApiModelProperty(name = "bulletinType", value = "内容类型（1：通知说明，2：图文公告）")
    private Integer bulletinType;

    @NotNull(message ="通告内容不能为空")
    @ApiModelProperty(name = "content", value = "通告内容")
    private String content;

    @ApiModelProperty(name = "noticeType", value = "先传3，公告类型（1：户外站点，2：园区，3：充电站，4：停车场，5：组织部门）")
    private Integer noticeType;

    @ApiModelProperty(name = "noticePhoto", value = "公告配图（多张,号隔开）")
    private String noticePhoto;
    @ApiModelProperty(name = "publishScope", value = "发布范围")
    private String publishScope;
    @NotNull(message ="公告对象类型不能为空")
    @ApiModelProperty(name = "noticeObjectType", value = "公告对象类型（1：业务模块，2：指定充电站）")
    private Integer noticeObjectType;

    @Data
    public static class NoticeObject{
        @ApiModelProperty(name = "noticeObjectId", value = "公告对象id")
        @NotNull(message = "公告对象id不能为空")
        private Long noticeObjectId;

        @ApiModelProperty(name = "noticeObjectName", value = "公告对象名称")
        @NotNull(message = "公告对象不能为空")
        private String noticeObjectName;
    }
}
