package com.caliverse.admin.domain.entity;

public enum EMetaData {
    
    NONE("", false),
    ITEM_DATA("Item", true),
    CLOTH_TYPE_DATA("ClothEquipType", true),
    TOOL_DATA("Tool", true),
    BAN_WORD_DATA("BanWord", true),
    TEXT_STRING_DATA("TextString", true),
    QUEST_DATA("Quest", true),
    LAND_DATA("Land", true),
    BUILDING_DATA("Building", true),
    GAME_MODE_DATA("GameMode", true),
    GAME_MODE_FFA_DATA("GameModeTpsFfa", true),
    GAME_MODE_TDM_DATA("GameModeTpsTdm", true),
    GAME_MODE_MATCH_DATA("GameModeMatch", true),
    BATTLE_CONFIG_DATA("BattleFFAConfig", true),
    BATTLE_REWARD_DATA("BattleFFAReward", true),
    SYSTEM_MAIL_DATA("SystemMail", true)

    ;

    private String fileName;
    private boolean isRequired;
    
    EMetaData(String fileName, boolean isRequired) {
        this.fileName = fileName;
        this.isRequired = isRequired;
    }

    public String getFileName(){
        return fileName;
    }

    public boolean getIsRequired(){
        return isRequired;
    }

    public static boolean getIsRequired(String fileName) {
        for (EMetaData metaData : EMetaData.values()) {
            if (metaData.getFileName().equals(fileName)) {
                return metaData.getIsRequired();
            }
        }
        return false; 
    }
}
