package com.ann.demo.entity.filing;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @Description 消息从属版本
 * @Date 2019/7/9 16:33
 * @Created by  ljx
 */
@Data
@Table
@Entity
public class MessageSubordinate {

    /**
     * 消息从属Id
     */
    @Id
    @GenericGenerator(name = "system-uuid", strategy = "uuid2")
    @GeneratedValue(generator = "system-uuid")
    private String id;

    /**
     * 消息Id
     */
    private String messageId;

    /**
     * 患者清单的关键信息
     */
    private String patientMain;

    /**
     * 消息Json
     */
    @Lob
    private String contentJson;

    /**
     * 2019-8-16
     * 循环次数
     */
    private Integer runs = 0;

    /**
     * 是否解析 0 未解析 1 解析 2 错误
     */
    private Integer status = 0;

    private String remark;

    public MessageSubordinate(String messageId, String patientMain, String contentJson) {
        this.messageId = messageId;
        this.patientMain = patientMain;
        this.contentJson = contentJson;
    }

    public MessageSubordinate(String messageId, String patientMain, Integer status) {
        this.messageId = messageId;
        this.patientMain = patientMain;
        this.status = status;
    }

    public MessageSubordinate() {
    }
}
