package com.docus.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.enums.StateEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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


/**
 * <p>
 * 被动接收任务表
 * </p>
 *
 * @author AutoGenerator
 * @since 2023-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("task_message_retry_log")
@ApiModel(value = "TaskMessageRetryLog对象", description = "被动接收任务表")
public class TaskMessageRetryLog implements Serializable {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private Long id;

    @ApiModelProperty(value = "重试消息主键")
    @TableField("message_id")
    private Long messageId;

    @ApiModelProperty(value = "消息名字")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "消息描述")
    @TableField("memo")
    private String memo;

    @ApiModelProperty(value = "消息类型")
    @TableField("collect_type")
    private CollectTypeEnum collectType;

    @ApiModelProperty(value = "重试标示")
    @TableField("retry_key")
    private String retryKey;

    @ApiModelProperty(value = "原始报文转对象json")
    @TableField("json_str")
    private String jsonStr;

    @ApiModelProperty(value = "原始报文")
    @TableField("source")
    private String source;

    @ApiModelProperty(value = "状态 0：成功，1:失败")
    @TableField("state")
    private StateEnum state = StateEnum.OK;

    @ApiModelProperty(value = "本批次异常信息")
    @TableField("error_msg")
    private String errorMsg;

    @ApiModelProperty(value = "入库时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "入库更新时间")
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


}
