package com.qmth.themis.business.bean.admin;

import com.qmth.themis.business.enums.ExceptionEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;

@ApiModel("报表-异常处理明细返回对象")
public class ExamExceptionDetailListBean {

    @ApiModelProperty(name = "异常开始时间")
    private Long startTime;
    @ApiModelProperty(name = "异常结束时间")
    private Long endTime;

    @ApiModelProperty(name = "异常原因")
    private String reason;

    @ApiModelProperty(name = "持续时长")
    private Long totalTime;

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public String getReason() {
        if (Objects.nonNull(reason)) {
            return ExceptionEnum.valueOf(reason).getCode();
        } else {
            return reason;
        }
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Long getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(Long totalTime) {
        this.totalTime = totalTime;
    }


}
