package com.yn.bftl.thirdparty.modules.chinaums.enums;

import lombok.AllArgsConstructor;

/**
 * @program: yn-byx-thirdparty
 * @description: 交易代码 枚举
 * @author: Jing
 * @create: 2024-08-27 17:04
 **/
public enum TransactionCodeEnum {
    ACCTSC010001("开户"),
    ACCTSC010002("账户激活"),
    ACCTSC010003("账户锁定"),
    ACCTSC010004("账户解锁"),
    ACCTSC010005("账户注销"),
    ACCTSC010006("修改密码"),
    ACCTSC010007("重置密码"),
    ACCTSC010008("验证密码"),
    ACCTSC010009("修改账户信息"),
    ACCTSC010010("绑定银行卡"),
    ACCTSC010011("解绑银行卡"),
    ACCTSC010012("设置默认银行卡"),
    ACCTSC010013("账户银行卡关系授权"),
    ACCTSC010014("账户银行卡关系取消授权"),
    ACCTSC010015("关联理财银行账户"),
    ACCTSC010016("取消关联理财银行账户"),
    ACCTSC010017("设置授信额度"),
    ACCTSC010018("启用授信账户"),
    ACCTSC010019("停用授信账户"),
    ACCTSC020001("代收付入账充值"),
    ACCTSC020002("消费"),
    ACCTSC020003("消费冲正"),
    ACCTSC020004("消费撤销"),
    ACCTSC020005("消费退货"),
    ACCTSC020006("转账"),
    ACCTSC020007("提现"),
    ACCTSC029007("提现反交易"),
    ACCTSC020008("汇款"),
    ACCTSC029008("汇款反交易"),
    ACCTSC020009("冻结"),
    ACCTSC020010("解冻"),
    ACCTSC020011("手续费"),
    ACCTSC020012("收款"),
    ACCTSC020013("付款"),
    ACCTSC020014("退款扣款"),
    ACCTSC020015("清算入账充值"),
    ACCTSC020016("汇款入账充值"),
    ACCTSC020017("手工充值"),
    ACCTSC020018("退款入账充值"),
    ACCTSC020019("代扣充值"),
    ACCTSC020020("异常差错充值"),
    ACCTSC020021("异常差错扣款"),
    ACCTSC020022("基金赎回充值"),
    ACCTSC020023("基金申购扣款"),
    ACCTSC020024("基金赎回款清算入账"),
    ACCTSC020025("基金申购款清算划付"),
    ACCTSC020026("基金申购款资金调拨"),
    ACCTSC020027("商户清算入账"),
    ACCTSC020028("商户清算出账"),
    ACCTSC020029("消费退款入账"),
    ACCTSC020030("消费支付出账"),
    ACCTSC020031("基金赎回款资金调拨"),
    ACCTSC020032("缴费单支付"),
    ACCTSC020033("网联 C 扫 B 支付"),
    ACCTSC020034("网联 B 扫 C 支付"),
    ACCTSC020035("网联退款"),
    ACCTSC020036("信用卡还款"),
    ACCTSC020037("超级捷算申购"),
    ACCTSC020038("超级捷算赎回"),
    ACCTSC020039("银行卡转账入账"),
    ACCTSC020040("银行卡转账出账"),
    ACCTSC020041("追加冻结金额"),
    ACCTSC020042("额度业务扣款"),
    ACCTSC020043("额度消费"),
    ACCTSC020044("额度使用还款"),
    ACCTSC020045("额度使用计息"),
    ACCTSC020046("额度使用还息"),
    ACCTSC020047("资金结算户手续费"),
    ACCTSC020048("结算结转 好支付分帐后的分账方入账"),
    ACCTSC020049("支付结转 好订单核销后的供应商入账"),
    ACCTSC020050("担保支付"),
    ACCTSC020051("渠道转入充值"),
    ACCTSC030001("调账"),
    ACCTSC040001("电子券扣款"),
    ACCTSC040002("电子券充值"),
    ACCTSC040003("电子券消费支付出账"),
    ACCTSC040004("电子券消费退款入账"),
    ACCTSC050001("授信使用"),
    ACCTSC050002("授信还款"),
    ACCTSC050003("授信记息"),
    ACCTSC050004("授信还息"),
    ACCTSC060001("结算划付"),
    ACCTSC060002("结算充值"),
    ACCTSC060003("通用扣款"),
    ACCTSC060004("通用扣款冲正"),
    ACCTSC070001("提现冲正"),
    ACCTSC070002("汇款冲正"),
    ACCTSC070003("超级捷算申购冲正"),
    ACCTSC070004("结算划付冲正"),
    ACCTSC070005("信用卡还款冲正"),
    ACCTSC080001("虚拟账户充值"),
    ACCTSC080002("虚拟账户消费转账"),
    ACCTSC080003("虚拟账户结转出金"),
    ACCTSC080004("虚拟账户消费出金"),
    ACCTSC080005("虚拟账户消费入金"),
    ACCTSC080006("虚拟账户充值撤销"),
    ACCTSC080007("虚拟账户异常差错充值"),
    ACCTSC080008("渠道来款");

    private final String description;

    TransactionCodeEnum(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public static TransactionCodeEnum fromCode(String code) {
        for (TransactionCodeEnum transactionCode : values()) {
            if (transactionCode.name().equals(code)) {
                return transactionCode;
            }
        }
        throw new IllegalArgumentException("Invalid transaction code: " + code);
    }
}
