package com.bizzan.bitrade.entity;

/**
 * 体验金提现申请状态
 */
public enum ExperienceGiftWithdrawStatus {

    PENDING(0, "待审核"),
    APPROVED(1, "已通过"),
    REJECTED(2, "已驳回");

    ExperienceGiftWithdrawStatus(int code, String description) {
        this.code = code;
        this.description = description;
    }

    private final int code;
    private final String description;

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static ExperienceGiftWithdrawStatus of(int code) {
        for (ExperienceGiftWithdrawStatus s : values()) {
            if (s.code == code) return s;
        }
        throw new IllegalArgumentException("Unknown ExperienceGiftWithdrawStatus code: " + code);
    }
}
