package com.ywt.alipaympapi.models.enums;

public enum PaymentStatusEnum {
    Pending("待支付", 0),
    Processing("支付处理中", 1),
    Success("支付成功", 2),
    Failed("支付失败", 3);

    private final String displayName;

    private final int value;

    PaymentStatusEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public static String getDisplayName(int value) {
        switch (value) {
            case 0:
                return "待支付";
            case 1:
                return "支付处理中";
            case 2:
                return "支付成功";
            case 3:
                return "支付失败";
            default:
                return null;
        }
    }

    public int getValue() {
        return value;
    }
}
