package cn.estsh.i3plus.pojo.platform.bean;


import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;

/**
 * @Description :
 * @Reference :
 * @Author : wei.peng
 * @CreateDate : 20-4-20 上午9:46
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_POJO_VERSION_DETAIL")
@Api(value="对象历史")
public class SysPojoVersionDetail extends BaseBean {

    private static final long serialVersionUID = 5385530381442176242L;
    @Column(name="POJO_VERSION_ID")
    @ApiParam(value ="对象id" ,example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long pojoVersionId;

    @Lob
    @Column(name="POJO_BEFORE",length = 5000)
    @ApiParam(value ="原始对象信息")
    private String pojoBefore;

    @Lob
    @Column(name="POJO_BEFORE_TXT",length = 5000)
    @ApiParam(value ="原始对象信息转换后")
    private String pojoBeforeTxt;

    @Lob
    @Column(name="POJO_AFTER",length = 5000)
    @ApiParam(value ="修改之后对象信息")
    private String pojoAfter;

    @Lob
    @Column(name="POJO_AFTER_TXT",length = 5000)
    @ApiParam(value ="修改之后对象信息转换后")
    private String pojoAfterTxt;

    @Lob
    @Column(name="POJO_COMPARE",length = 5000)
    @ApiParam(value ="记录对象对比差异")
    private String pojoCompare;

    @Lob
    @Column(name="POJO_COMPARE_TXT",length = 5000)
    @ApiParam(value ="记录对象对比差异")
    private String pojoCompareTxt;
}
