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

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
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.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @Description :工步参数
 * @Reference :
 * @Author : jack.jia
 * @CreateDate : 2019-04-02
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_STEP_PARAM")
@Api("工步参数")
public class MesStepParam extends BaseBean implements Serializable {
    private static final long serialVersionUID = 6709455994477993263L;

    @Column(name = "STEP_CODE")
    @ApiParam("工步代码")
    private String stepCode;

    @Column(name = "PARAM_TYPE")
    @ApiParam("参数类型")
    private Integer paramType;

    @Column(name = "PARAM_CODE")
    @ApiParam("参数代码")
    private String paramCode;

    @Column(name = "PARAM_NAME")
    @ApiParam("参数名称")
    private String paramName;

    @Column(name = "PARAM_ATTRIBUTE")
    @ApiParam("参数属性 text select")
    private String paramAttribute;

    @Column(name = "EXHIBITION_KEY")
    @ApiParam("展示key")
    private String exhibitionKey;

    @Column(name = "EXHIBITION_VALUE")
    @ApiParam("展示value")
    private String exhibitionValue;

    @Column(name = "OBJECT_CODE")
    @ApiParam("参数对象")
    private String objectCode;

    @Column(name = "TYPE")
    @ApiParam("type")
    private Integer type = 0;

    @Column(name = "OBJECT_WHERE")
    @ApiParam("参数对象查询条件")
    private String objectWhere;

    @Transient
    @ApiParam("可选值的数据")
    private List<Map<String, Object>> enumList;

    @Transient
    @ApiParam("key的值")
    private Object geValue;

    @Transient
    @ApiParam("value的值")
    private Object geDescription;
}
