package com.pandoli365.bibimbap.badge;

public enum BadgeKeys {
    REVIEWER("리뷰어", "REVIEW_WRITTEN", 10),
    TECHNICIAN("테크니션", "GAME_UPLOADED", 3);

    private final String displayName;
    private final String eventType;
    private final int threshold;

    BadgeKeys(String displayName, String eventType, int threshold) {
        this.displayName = displayName;
        this.eventType = eventType;
        this.threshold = threshold;
    }

    public String displayName() {
        return displayName;
    }

    public String eventType() {
        return eventType;
    }

    public int threshold() {
        return threshold;
    }

    public static boolean isValid(String key) {
        if (key == null) {
            return false;
        }
        try {
            valueOf(key);
            return true;
        } catch (IllegalArgumentException e) {
            return false;
        }
    }
}
