package com.jeesharp.business.modules.finance.paymentrecord.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付币种编码（当前仅内置人民币，可扩展）。
 *
 * @author jeesharp
 * @since 2026-05-09
 */
@Getter
@AllArgsConstructor
public enum PayRecordCurrencyEnum {

    CNY("CNY", "人民币");

    private final String code;
    private final String desc;

    public static String getDescByCode(String code) {
        if (code == null || code.isEmpty()) {
            return "";
        }
        for (PayRecordCurrencyEnum e : values()) {
            if (e.code.equals(code)) {
                return e.getDesc();
            }
        }
        return code;
    }
}
