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 javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

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

    private static final long serialVersionUID = 7860212457391123584L;
    @Column(name = "REPORT_ID")
    @ApiParam(value = "报表主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long reportId;

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

    @Column(name = "LAYOUT_ELEMENT_ID")
    @ApiParam(value = "布局元素主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long layoutElementId;

    @Column(name="REF_TYPE_ID")
    @ApiParam(value ="序列")
    private Integer refTypeId;

    @Column(name = "REF_ID")
    @ApiParam(value = "关联id")
    @JsonSerialize (using = ToStringSerializer.class)
    private Long refId;

    @Column(name = "REF_NAME_RDD")
    @ApiParam(value = "关联对象名称")
    private String refNameRdd;

    @Transient
    @ApiParam(value = "关联对象")
    private Object refObject;

}