package com.xingxi.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: xingxi
 * @description: 库存流水分类
 * @author: bao
 * @create: 2025-04-21
 */
@AllArgsConstructor
@Getter
public enum EInventoryBillType {

    STOCKIN("stockin", "入库"),
    STOCKOUT("stockout", "出库"),
    LOCK("lock", "锁库"),
    UNLOCK("unlock", "解锁");

    private String val;
    private String desc;

    /** 解析 */
    public static EInventoryBillType parseByVal(String val) {
        for(EInventoryBillType type : EInventoryBillType.values()) {
            if(type.getVal().equalsIgnoreCase(val)) {
                return type;
            }
        }
        return EInventoryBillType.STOCKIN;
    }
}
