package com.zksy.manhole.dto.in;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 批量下发运维任务-入参
 *
 * @author xianggx
 */
@Data
@ApiModel(value = "批量下发运维任务-入参", description = "批量下发运维任务-入参")
public class MaintenanceTaskDispatchInDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "运维部门ID", required = true)
    private Long deptId;

    @ApiModelProperty(value = "派单人ID", required = true)
    private Long dispatchUserId;

    @ApiModelProperty(value = "接收维护人员ID", required = true)
    private Long receiveUserId;

    @ApiModelProperty(value = "任务详细描述", required = true)
    private String taskDesc;

    @ApiModelProperty(value = "任务优先级：1-严重 2-一般", required = true)
    private Integer taskLevel;

    @ApiModelProperty(value = "计划开始时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date planStartTime;

    @ApiModelProperty(value = "计划结束时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date planEndTime;

    @ApiModelProperty(value = "设备报警明细列表", required = true)
    private List<DispatchDetailInDTO> detailList;

    /**
     * 设备报警明细-入参
     */
    @Data
    @ApiModel(value = "设备报警明细-入参", description = "设备报警明细-入参")
    public static class DispatchDetailInDTO implements Serializable {
        private static final long serialVersionUID = 1L;

        @ApiModelProperty(value = "设备ID", required = true)
        private String deviceId;

        @ApiModelProperty(value = "设备编码")
        private String deviceCode;

        @ApiModelProperty(value = "关联报警ID")
        private String alarmId;

        @ApiModelProperty(value = "报警描述")
        private String alarmDesc;
    }
}
