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 java.io.Serializable;

/**
 * @Description :状态机工步参数配置表
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2019-04-02
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_STATE_MACHINE_STEP")
@Api("状态机工步参数配置表")
public class MesStateMachineStep extends BaseBean implements Serializable {

    @Column(name = "SM_CODE")
    @ApiParam("状态机代码")
    private String smCode;

    @Column(name = "STATUS_CODE")
    @ApiParam("状态代码")
    private String statusCode;

    @Column(name = "AMG_ID")
    @ApiParam("工步集代码")
    private Long amgId;

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

    @Column(name = "STEP_SEQ")
    @ApiParam("工步顺序")
    private Integer stepSeq;

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

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

    @Column(name = "PARAM_VALUE")
    @ApiParam("工步参数值")
    private String paramValue;

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


    public int getStepSeq() {
        return this.stepSeq == null ? 0 : this.stepSeq;
    }

    public void setStepSeq(int stepSeq) {
        this.stepSeq = stepSeq;
    }

    public int getParamTypeVal() {
        return this.paramType == null ? 0 : this.paramType;
    }
}
