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;

/**
 * @Description :
 * @Reference :
 * @Author : Adair Peng
 * @CreateDate : 2019-03-21 14:35
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="bf_cascade_detail")
@Api(value="级联元素明细",description = "级联元素")
public class BfCascadeDetail extends BaseBean {

    private static final long serialVersionUID = -8365699249398175846L;
    @Column(name = "CASCADE_ID")
    @ApiParam(value = "级联ID", example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long cascadeId;

    @Column(name = "ELEMENT_ID")
    @ApiParam(value = "对象元素ID", example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long elementId;

    @Column(name = "DETAIL_LABEL_TEXT")
    @ApiParam(value = "提示信息")
    private String detailLabelText;

    @Column(name="ELEMENT_NAME")
    @ApiParam(value ="元素名称")
    private String elementName;

    @Column(name="DETAIL_GRADE")
    @ApiParam(value ="当前级联层级")
    private Integer detailGrade;

    @Column(name = "PARENT_ID")
    @ApiParam(value = "父级ID", example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    @Column(name = "PARENT_DEFAULT_VALUE")
    @ApiParam(value = "父级默认值")
    private String parentDefaultValue;

    @Column(name = "PARENT_NAME_RDD")
    @ApiParam(value = "父级名称")
    private String parentNameRdd;

    @Column(name = "ELEMENT_PROPERTY_VALUE_ID")
    @ApiParam(value = "对象属性-元素属性ID", example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long elementPropertyValueId;

    @Column(name = "ELEMENT_PROPERTY_VALUE_Rdd")
    @ApiParam(value = "对象属性-元素属性")
    private String elementPropertyValueRdd;

    @Column(name = "ELEMENT_PROPERTY_TEXT_ID")
    @ApiParam(value = "显示属性-元素属性ID", example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long elementPropertyTextId;

    @Column(name = "ELEMENT_PROPERTY_TEXT_RDD")
    @ApiParam(value = "显示属性")
    private String elementPropertyTextRdd;


    @Column(name="CASCADE_DETAIL_DESCRIPTION")
    @ApiParam(value ="级联描述")
    private String cascadeDetailDescription;
}
