package cn.newfeifan.mall.module.distri.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum WithdrawalChannelTypeEnum {

    WECHAT(1,"微信"),
    ALIPAY(2,"支付宝"),
    BANK(3,"银行账号"),
    ;

    private final Integer type;
    private final String name;

    public static String getName(int value) {
        for (WithdrawalChannelTypeEnum item : WithdrawalChannelTypeEnum.values()) {
            if (item.getType() == value) {
                return item.getName();
            }
        }
        return null;
    }
}
