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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.BlockFormEnumUtil;
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;

/**
 * @Description :
 * @Reference :
 * @Author : Adair Peng
 * @CreateDate : 2019-03-21 13:24
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "BF_ELEMENT_GRID")
@Api(value = "对象元素表格", description = "对象元素表格")
public class BfElementGrid extends BaseBean {

    private static final long serialVersionUID = -3730288075103132153L;
    //外键关联数据对象主键
    @Column(name = "ELEMENT_ID")
    @ApiParam(value = "对象元素ID", example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long elementId;

    @Column(name = "IS_LINE_SHOW_NUMBER")
    @ApiParam(value = "显示行号")
    @AnnoOutputColumn(refClass = BlockFormEnumUtil.TABLE_ROW_NUMBER.class)
    private Integer isLineShowNumber;

    @Column(name = "IS_LINE_MULTIPLE")
    @ApiParam(value = "是否单选")
    @AnnoOutputColumn(refClass = BlockFormEnumUtil.TABLE_ROW_PICK.class)
    private Integer isLineMultiple;

    @Column(name = "IS_OBJECT_FIND")
    @ApiParam(value = "是否查询")
    private Integer isObjectFind;

}
