package com.sckw.payment.api.model.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ChannelEnum {
    HF("01","huifu", "汇付渠道"),
    XS("02","newpay", "新生渠道"),
    ZX("03","citic", "中信渠道");
    private String code;
    private String channel;
    private String desc;

    public static ChannelEnum getByCode(String code) {
        for (ChannelEnum channelEnum : ChannelEnum.values()) {
            if (channelEnum.getCode().equals(code)) {
                return channelEnum;
            }
        }
        return null;
    }

}
