package com.ktg.iscs.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ktg.common.annotation.Excel;
import com.ktg.common.core.domain.model.BaseBean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 异常记录对象 is_exception
 *
 * @author cgj
 * @date 2025-03-06
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class IsException extends BaseBean
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "异常记录ID")
    @TableId(type = IdType.AUTO)
    private Long exceptionId;

    @ApiModelProperty(value = "异常种类(1-锁控柜 2-物资柜)")
    @Excel(name = "异常种类(1-锁控柜 2-物资柜)")
    private String exceptionCategory;

    @ApiModelProperty(value = "异常类型（字典exception_type）")
    @Excel(name = "异常类型", readConverterExp = "字=典exception_type")
    private String exceptionType;

    @ApiModelProperty(value = "异常类型（字典exception_type）")
    @Excel(name = "异常类型", readConverterExp = "字=典exception_type")
    @TableField(exist = false)
    private String exceptionTypeName;

    @ApiModelProperty(value = "异常等级")
    @Excel(name = "异常等级")
    private String exceptionLevel;

    @ApiModelProperty(value = "异常等级")
    @Excel(name = "异常等级")
    @TableField(exist = false)
    private String exceptionLevelName;

    @ApiModelProperty(value = "异常描述")
    @Excel(name = "异常描述")
    private String exceptionDescription;

    @ApiModelProperty(value = "来源ID")
    @Excel(name = "来源ID")
    private Long sourceId;

    @ApiModelProperty(value = "来源name")
    @Excel(name = "来源name")
    @TableField(exist = false)
    private String sourceName;

    @ApiModelProperty(value = "异常发生时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "异常发生时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date raiseTime;

    @ApiModelProperty(value = "异常发生时间")
    @TableField(exist = false)
    private String startRaiseTime;

    @ApiModelProperty(value = "异常发生时间")
    @TableField(exist = false)
    private String endRaiseTime;

    @ApiModelProperty(value = "引发人ID")
    @Excel(name = "引发人ID")
    private Long raiser;

    @ApiModelProperty(value = "引发人Name")
    @Excel(name = "引发人Name")
    @TableField(exist = false)
    private String raiserName;

    @ApiModelProperty(value = "参数ID")
    @Excel(name = "参数ID")
    private Long parameters;

    @ApiModelProperty(value = "异常处理时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "异常处理时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date handleTime;

    @ApiModelProperty(value = "异常处理时间")
    @TableField(exist = false)
    private String startHandleTime;

    @ApiModelProperty(value = "异常处理时间")
    @TableField(exist = false)
    private String endHandleTime;

    @ApiModelProperty(value = "状态（0-未处理 1-已处理）")
    @Excel(name = "状态", readConverterExp = "0=-未处理,1=-已处理")
    private String status;

    @ApiModelProperty(value = "删除标志（0代表存在 2代表删除）")
    private String delFlag;


}
