package com.ywt.mg.domain.models.enums;

public enum MealPaymentStatusEnum {

    UNKNOWN("待支付", -1),
    Pending("待支付", 0),
    Processing("支付处理中", 1),
    Success("支付成功", 2),
    Failed("支付失败", 3);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static MealPaymentStatusEnum valueOf(int value) {
        for (MealPaymentStatusEnum typeEnum : MealPaymentStatusEnum.values()) {
            if (typeEnum.value == value) {
                return typeEnum;
            }
        }
        return UNKNOWN;
    }
}
