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_REPORT")
@Api(value="自定义报表",description = "所有报表实例，生成最后的报表")
public class BrReport extends BaseBean {

    private static final long serialVersionUID = 1987404021291348713L;
    @Column(name="REPORT_NAME")
    @ApiParam(value ="报表名称")
    private String reportName;

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

    @Column(name="LAYOUT_NAME_RDD")
    @ApiParam(value ="布局名称")
    private String layoutNameRdd;

    @Column(name = "REPORT_DESCRIPTION")
    @ApiParam(value ="报表描述")
    private String reportDescription;

    @Transient
    @ApiParam(value = "报表排版关系")
    private BrLayout layout;

    @Transient
    @ApiParam(value = "报表排版关系")
    private List<BrRefReport> brRefReportList;
}
