package com.cool.store.enums.wallet;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 钱包交易业务模块枚举类
 * </p>
 *
 * @author wangff
 * @since 2026/2/4
 */
@Getter
@AllArgsConstructor
public enum WalletTradeModuleEnum {

    FRANCHISE_PAY("FRANCHISE_PAY", "钱包加盟缴费"),
    STANDARD_STORE("STANDARD_STORE", "标准店缴费"),
    TRANSFER("TRANSFER", "分账管理"),
    ;

    private final String module;

    private final String desc;

    public static WalletTradeModuleEnum getByModule(String module) {
        for (WalletTradeModuleEnum value : WalletTradeModuleEnum.values()) {
            if (value.getModule().equals(module)) {
                return value;
            }
        }
        return null;
    }
}
