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

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

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

@Data
@ApiModel(value="告警推送配置", description="告警推送配置")
public class ChargeWarnPushConfigDTO {

    @ApiModelProperty(name = "id", value = "告警推送配置id")
    private Long id;
    @ApiModelProperty(name = "stationId", value = "电站id,多选的话逗号隔开")
    @NotNull(message = "电站id不能为空")
    private String stationId;
    /**
     * 报警类型
     */
    @ApiModelProperty(name = "identity", value = "报警类型")
    @NotNull(message = "告警类型标志不能为空")
    private String identity;
    /**
     * 告警类型id
     */
    @ApiModelProperty(name = "categoryId", value = "告警类型id")
    @NotNull(message = "告警类型id不能为空")
    private Long categoryId;
    /**
     * 推送频率（1：一次推送，2：半小时一次，3：一小时一次）
     */
    @ApiModelProperty(name = "pushRate", value = "推送频率（1：一次推送，2：半小时一次，3：一小时一次）")
    @NotNull(message = "推送频率不能为空")
    private Integer pushRate;
    /**
     * 推送类型（1：微信公众号）
     */
    @ApiModelProperty(name = "pushType", value = "推送类型（1：微信公众号）")
    @NotNull(message = "推送类型不能为空")
    private Integer pushType;

    @ApiModelProperty(name = "pushUserList", value = "推送人员列表")
    @NotNull(message = "推送人员不能为空")
    @Size(min = 1,message = "推送人员不能为空")
    private List<ChargeWarnPushConfigDTO.WarnPushUser> pushUserList;
    @Data
    public static class WarnPushUser{
        @ApiModelProperty(name = "name", value = "推送名字")
        private String name;

        @ApiModelProperty(name = "phone", value = "推送手机号码")
        private String phone;
    }


}
