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 :mes系统业务方法
 * @Reference :
 * @Author : jack.jia
 * @CreateDate : 2019-04-12
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_METHOD")
@Api("系统业务方法")
public class MesMethod extends BaseBean implements Serializable {
    private static final long serialVersionUID = -3254086662292709833L;

    @Column(name = "METHOD_CODE")
    @ApiParam("方法代码")
    private String methodCode;

    @Column(name = "METHOD_NAME")
    @ApiParam("方法名称")
    private String methodName;

    @Column(name = "CALL_CLASS")
    @ApiParam("具体实现类")
    private String callClass;

    /**
     * 10-执行方法（不需要返回值），20-完成方法（返回ResultBean）
     */
    @Column(name = "METHOD_TYPE")
    @ApiParam("方法类型")
    private Integer methodType;

    public int getMethodTypeVal() {
        return this.methodType == null ? 0 : this.methodType;
    }
}
