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

/**
 * @Description :
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2019-03-21 20:56
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BF_METHOD_DETAIL")
@Api(value="表单功能明细",description = "表单功能明细")
public class BfMethodDetail extends BaseBean {

    private static final long serialVersionUID = 3982619673130000003L;
    @Column(name="METHOD_ID")
    @ApiParam(value ="功能id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long methodId;

    @Column(name="METHOD_NAME_RDD")
    @ApiParam(value ="功能名称")
    private String methodNameRdd;

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

    @Column(name="METHOD_DETAIL_NAME")
    @ApiParam(value ="表单功能明细名称")
    private String methodDetailName;

    @Column(name="ELEMENT_ID")
    @ApiParam(value ="表单元素id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long elementId;

    @Column(name="ELEMENT_NAME_RDD")
    @ApiParam(value ="表单元素名称")
    private String elementNameRdd;

    @Transient
    @ApiParam(value ="表单功能自定义按钮")
    private List<BfButton> bfButtonList;
}
