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:40
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BF_METHOD")
@Api(value="表单功能",description = "表单功能")
public class BfMethod extends BaseBean {

    private static final long serialVersionUID = 6976569600026342045L;
    @Column(name="METHOD_NAME")
    @ApiParam(value ="功能名称")
    private String methodName;

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

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

    @Column(name="METHOD_DESCRIPTION")
    @ApiParam(value ="功能描述")
    private String methodDescription;

    @Column(name="IS_DESIGN")
    @ApiParam(value ="是否进行功能设计")
    private Integer isDesign;

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