package com.ywt.models.enums;

//退款状态 1: 退款成功，2: 退款异常，3: 退款关闭
public enum RefundStatusEnum {
    PENDING("处理中", 0),
    SUCCESS("退款成功", 1),
    EXCEPTION("退款异常", 2),
    CLOSED("退款关闭", 3);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }


    public static String getDisplayName(int value) {
        switch (value) {
            case 0:
                return PENDING.displayName;
            case 1:
                return SUCCESS.displayName;
            case 2:
                return EXCEPTION.displayName;
            case 3:
                return CLOSED.displayName;
            default:
                return "";
        }
    }
}
