package cn.estsh.i3plus.pojo.form.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 : yunhao
 * @CreateDate : 2019-03-21 13:54
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "BF_LAYOUT_COLUMN")
@Api(value = "自定义表单布局-列")
public class BfLayoutColumn extends BaseBean {

    private static final long serialVersionUID = -8711414349182712011L;
    @Column(name = "LAYOUT_ID")
    @ApiParam(value = "布局主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long layoutId;

    @Column(name = "LAYOUT_ROW_ID")
    @ApiParam(value = "行主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long layoutRowId;

    @Column(name = "COLUMN_COLSPAN")
    @ApiParam(value = "跨列数")
    private Integer columnColspan;

    @Column(name = "COLUMN_ROWSPAN")
    @ApiParam(value = "跨行数")
    private Integer columnRowspan;

    @Column(name = "COLUMN_WIDTH")
    @ApiParam(value = "列宽")
    private Integer columnWidth;

    @Column(name = "COLUMN_STYLE")
    @ApiParam(value = "列样式")
    private String columnStyle;

    @Column(name = "COLUMN_SORT")
    @ApiParam(value = "排序，降序")
    private Integer columnSort;

    @Lob
    @Column(name = "COLUMN_DESCRIPTION")
    @ApiParam(value = "列描述")
    private String columnDescription;
}
