package com.xueyi.system.emcs.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xueyi.common.core.annotation.Excel;
import com.xueyi.common.core.web.entity.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.time.LocalDateTime;

import static com.xueyi.common.core.constant.basic.EntityConstants.NAME;
import static com.xueyi.common.core.constant.basic.EntityConstants.REMARK;
import static com.xueyi.common.core.constant.basic.EntityConstants.SORT;
import static com.xueyi.common.core.constant.basic.EntityConstants.STATUS;

/**
 * 数字人状态事件上报日志 持久化对象
 *
 * @author xueyi
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "dm_exception_log", excludeProperty = { STATUS, SORT, REMARK, NAME })
public class DmExceptionLogPo extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 数字人ID */
    @Excel(name = "数字人Code")
    protected String manCode;

    @Excel(name = "devId")
    protected String devId;

    /** 故障类型(重启,摄像头故障等) */
    @Excel(name = "故障类型(重启,摄像头故障等)")
    protected String type;

    /** 故障等级 */
    @Excel(name = "故障等级")
    protected Integer level;

    /** 故障发生时间 */
    @Excel(name = "故障发生时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected LocalDateTime occurTime;

    /** 故障结束时间 */
    @Excel(name = "故障结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    protected LocalDateTime endTime;

    /** 事件名 */
    @Excel(name = "事件名")
    protected String exceptionName;

    /** 报警状态(0预警中 1已解除 ) */
    @Excel(name = "报警状态(0预警中 1已解除 )")
    protected Integer alertStatus;

    /** 所属组织ID */
    @Excel(name = "所属组织ID")
    protected Long deptId;

    /** 租户Id */
    @Excel(name = "租户Id")
    protected Long tId;

}