package com.qmth.sop.business.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.sop.common.contant.SystemConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 全局异常错误信息表
 * </p>
 *
 * @author wangliang
 * @since 2023-07-17
 */
@ApiModel(value = "TGError对象", description = "全局异常错误信息表")
public class TGError implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "机构id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orgId;

    @ApiModelProperty(value = "实体id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long objId;

    @ApiModelProperty(value = "实时摘要信息")
    private String summary;

    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    public TGError() {

    }

    public TGError(String summary) {
        this.id = SystemConstant.getDbUuid();
        this.summary = summary;
        this.createTime = System.currentTimeMillis();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public Long getObjId() {
        return objId;
    }

    public void setObjId(Long objId) {
        this.objId = objId;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
}
