package cn.estsh.i3plus.pojo.report.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 org.hibernate.annotations.Type;

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

/**
 * @Description : 元素和报表关联表，多对多
 * @Reference :
 * @Author : alwaysfrin
 * @CreateDate : 2018-12-25 19:54
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BR_REF_REPORT_TYPESET")
@Api(value="元素&模板&报表",description = "报表，元素和模板的关联表 * -》 *")
public class BrRefReportTypeset extends BaseBean {

    @Column(name = "REPORT_ID")
    @ApiParam(value = "报表主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long reportId;

    @Column(name = "REPORT_NAME_RDD")
    @ApiParam(value = "报表名称")
    private String reportNameRdd;

    @Column(name = "REPORT_TYPESET_TYPE")
    @ApiParam(value = "报表列类型")
    private Integer reportTypesetType;

    @Column(name = "LAYOUT_COLUMN_ID")
    @ApiParam(value = "布局列主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long layoutColumnId;

    /**
     * 关联id，元素或模板id
     */
    @Column(name = "REF_ID")
    @ApiParam(value = "关联id")
    @JsonSerialize (using = ToStringSerializer.class)
    private Long refId;

    /**
     * 关联元素或模板html
     */
    @Lob
    @Column(name = "REF_HTML")
    @ApiParam(value = "关联对象html")
    private String refHtml;

    @Lob
    @Column(name = "TYPESET_DESCRIPTION")
    @ApiParam(value ="排版描述")
    private String typesetDescription;
}