package com.unis.crk.enums;

import lombok.Getter;

/**
 * 货位状态
 * @author TS
 *
 */
@Getter
public enum CrkStatus {
	None((short)0),			//无状态
	Fc((short)1),			//封仓
	In((short)2),			//入库中
	Out((short)4);			//出库中


 // 定义私有变量
    private Short nCode;
    // 构造函数，枚举类型只能为私有
    private CrkStatus(Short _nCode) {
        this.nCode = _nCode;
    }
    
    @Override
    public String toString() {
        return String.valueOf(this.nCode);
    }
    
    public Short value(){
    	return this.nCode;
    }
    
    public static CrkStatus valueOf(Short i)
    {
    	switch(i){
	    	case 0:
	    		return None;
	    	case 1:
	    		return Fc;
        	case 2:
        		return In;
        	case 4:
        		return Out;
        	default:
    			return null;
        }
    }
}
