package com.lz.common.emun;

/**
 * @Author: djc
 * @Desc:
 * @Date: 2020/7/27 10:33
 */
public enum EquipmentState {

    NORMAL(0,"正常(采购或归还)"),
    SALE(1,"售出"),
    FAULT(2,"不可用"),
    TRANSFER(3,"调拨"),
    APPLY(4,"申领"),
    CHECK(5,"盘点查询");


    EquipmentState(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static EquipmentState findByCode(Integer code){
        for(EquipmentState role:EquipmentState.values()){
            if(role.getCode()==code){
                return role;
            }
        }
        return null;
    }
    private int code;
    private String name;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
