package com.caliverse.admin.domain.entity;

public enum EMetaData {
    
    NONE("", false),
    ITEM_DATA("ItemData.json", true),
    CLOTH_TYPE_DATA("ClothEquipTypeData.json", true),
    TOOL_DATA("ToolData.json", true),
    BAN_WORD_DATA("BanWordData.json", true),
    TEXT_STRING_DATA("TextStringData.json", true),
    QUEST_DATA("QuestData.json", true),
    LAND_DATA("LandData.json", true),
    BUILDING_DATA("BuildingData.json", true),
    BATTLE_CONFIG_DATA("BattleFFAConfigData.json", true),
    BATTLE_REWARD_DATA("BattleFFARewardData.json", true),
    SYSTEM_MAIL_DATA("SystemMailData.json", 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; 
    }
}
