SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

-- --------------------------------------------------------------------------------
--  데이터 스크립트의 내용을 불러온다.
-- --------------------------------------------------------------------------------
CREATE DATABASE IF NOT EXISTS `eod_configuration` 
    DEFAULT CHARACTER SET utf8 
    COLLATE utf8_unicode_ci;

USE `eod_configuration`;

-- --------------------------------------------------------------------------------
-- Item 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `equipable` AS `equipable`, 
        `required_class` AS `requiredClass`, 
        `item_set_type` AS `itemSetType`, 
        `item_enable` AS `itemEnable`, 
        `need_class` AS `needClass`, 
        `item_grade` AS `itemGrade`, 
        `grade` AS `grade`, 
        `item_group` AS `itemGroup`, 
        `item_division` AS `itemDivision`, 
        `weapon_type` AS `weaponType`, 
        `equip_type` AS `equipType`, 
        `equip_slot` AS `equipSlot`, 
        `decomposition_state` AS `decompositionState`, 
        `decomposition_code` AS `decompositionCode`, 
        `upgrade_enable` AS `upgradeEnable`, 
        `upgrade_limit` AS `upgradeLimit`, 
        `required_level` AS `requiredLevel`, 
        `option_division` AS `optionDivision`, 
        `ib_attk_pow_constant` AS `ibAttkPowConstant`, 
        `ib_dfs_pow_constant` AS `ibDfsPowConstant`, 
        `ib_hp_constant` AS `ibHpConstant`, 
        `ib_st_reg` AS `ibStReg`, 
        `item_value` AS `itemValue`, 
        `target_inventory_type` AS `targetInventoryType`, 
        `enable_to_sell` AS `enableToSell`, 
        `store_sale_price` AS `storeSalePrice`, 
        `storable` AS `storable`, 
        `stack_type` AS `stackType`, 
        `stack_limit_per_slot` AS `stackLimitPerSlot`, 
        `possesion_count_limit` AS `possesionCountLimit`, 
        `item_stack` AS `itemStack`, 
        `consumable` AS `consumable`, 
        `consume_unit` AS `consumeUnit`, 
        `cooldown_time` AS `cooldownTime`, 
        `skill_link_id` AS `skillLinkId`, 
        `random_option_group` AS `randomOptionGroup`, 
        `random_option_count` AS `randomOptionCount`, 
        `set_group_id` AS `setGroupId`, 
        `fixed_option_group` AS `fixedOptionGroup`, 
        `trans_group_id` AS `transGroupId`, 
        `socket_count` AS `socketCount`, 
        `promotion_item_code` AS `promotionItemCode`, 
        `fusion_group_id` AS `fusionGroupId`, 
        `rune_option_group_id` AS `runeOptionGroupId`, 
        `nox_item` AS `noxItem`
    FROM `eod_configuration`.`data_item`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemUpgrade 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_upgrade`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_upgrade`()
BEGIN
    SELECT
        `upgrade_group_id` AS `upgradeGroupId`, 
        `item_upgrade_level` AS `itemUpgradeLevel`, 
        `success_rate` AS `successRate`, 
        `improvement` AS `improvement`, 
        `upgrade_cost` AS `upgradeCost`, 
        `revision_item_id` AS `revisionItemId`, 
        `revision_rate` AS `revisionRate`, 
        `material_item_code1` AS `materialItemCode1`, 
        `item_count_1` AS `itemCount1`, 
        `material_item_code2` AS `materialItemCode2`, 
        `item_count_2` AS `itemCount2`, 
        `transcend_type` AS `transcendType`
    FROM `eod_configuration`.`data_item_upgrade`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemTrans 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_trans`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_trans`()
BEGIN
    SELECT
        `trans_group_id` AS `transGroupId`, 
        `trans_type` AS `transType`, 
        `con_item_id` AS `conItemId`, 
        `item_count` AS `itemCount`, 
        `get_rate` AS `getRate`, 
        `get_rank` AS `getRank`
    FROM `eod_configuration`.`data_item_trans`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemCombine 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_combine`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_combine`()
BEGIN
    SELECT
        `combine_group_id` AS `combineGroupId`, 
        `combine_rank` AS `combineRank`, 
        `con_item_division` AS `conItemDivision`, 
        `item_count` AS `itemCount`, 
        `need_echant_level` AS `needEchantLevel`, 
        `trans_item` AS `transItem`
    FROM `eod_configuration`.`data_item_combine`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemDecompose 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_decompose`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_decompose`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `item_type_code` AS `itemTypeCode`, 
        `decomposition_item_code` AS `decompositionItemCode`, 
        `calculation_type` AS `calculationType`, 
        `item_count` AS `itemCount`
    FROM `eod_configuration`.`data_item_decompose`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- InvenExtend 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_inven_extend`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_inven_extend`()
BEGIN
    SELECT
        `extend_grade` AS `extendGrade`, 
        `increase_value` AS `increaseValue`, 
        `accumulate_value` AS `accumulateValue`, 
        `equip_type` AS `equipType`, 
        `inven_extend_price` AS `invenExtendPrice`
    FROM `eod_configuration`.`data_inven_extend`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemSet 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_set`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_set`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `set_count1` AS `setCount1`, 
        `option_division1` AS `optionDivision1`, 
        `option_value1` AS `optionValue1`, 
        `set_count2` AS `setCount2`, 
        `option_division2` AS `optionDivision2`, 
        `option_value2` AS `optionValue2`, 
        `set_count3` AS `setCount3`, 
        `option_division3` AS `optionDivision3`, 
        `option_value3` AS `optionValue3`
    FROM `eod_configuration`.`data_item_set`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemFusion 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_fusion`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_fusion`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `fusion_group_id` AS `fusionGroupId`, 
        `fusion_item_code` AS `fusionItemCode`, 
        `drop_rate` AS `dropRate`
    FROM `eod_configuration`.`data_item_fusion`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- GDStoneUpgrade 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_gd_stone_upgrade`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_gd_stone_upgrade`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `difference_step_min` AS `differenceStepMin`, 
        `difference_step_max` AS `differenceStepMax`, 
        `upgrade_rate` AS `upgradeRate`
    FROM `eod_configuration`.`data_gd_stone_upgrade`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemChoiceTicket 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_choice_ticket`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_choice_ticket`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `item_choice_group_id` AS `itemChoiceGroupId`, 
        `required_class` AS `requiredClass`, 
        `item_list_code` AS `itemListCode`
    FROM `eod_configuration`.`data_item_choice_ticket`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ConsumeItem 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_consume_item`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_consume_item`()
BEGIN
    SELECT
        `result_item_id` AS `resultItemId`, 
        `stage_type_able_group_id` AS `stageTypeAbleGroupId`
    FROM `eod_configuration`.`data_consume_item`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ConsumeMap 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_consume_map`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_consume_map`()
BEGIN
    SELECT
        `stage_type_able_group_id` AS `stageTypeAbleGroupId`, 
        `stage_type_able_group` AS `stageTypeAbleGroup`, 
        `consume_count_limit` AS `consumeCountLimit`
    FROM `eod_configuration`.`data_consume_map`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemNoxEnchant 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_nox_enchant`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_nox_enchant`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `nox_item` AS `noxItem`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`, 
        `value_flag` AS `valueFlag`, 
        `value_recalculate` AS `valueRecalculate`, 
        `value_pencentage` AS `valuePencentage`, 
        `nox_grade_enchant_rate` AS `noxGradeEnchantRate`, 
        `enchant_material_gtc` AS `enchantMaterialGtc`, 
        `enchant_material_counts` AS `enchantMaterialCounts`
    FROM `eod_configuration`.`data_item_nox_enchant`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ItemTranscend 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_item_transcend`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_item_transcend`()
BEGIN
    SELECT
        `transcend_rank` AS `transcendRank`, 
        `need_echant_level` AS `needEchantLevel`, 
        `transcend_cost` AS `transcendCost`, 
        `ib_attk_pow_constant_up` AS `ibAttkPowConstantUp`, 
        `ib_dfs_pow_constant_up` AS `ibDfsPowConstantUp`, 
        `ib_hp_constant_up` AS `ibHpConstantUp`, 
        `ib_st_reg_up` AS `ibStRegUp`
    FROM `eod_configuration`.`data_item_transcend`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- Town 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_town`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_town`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `limit_time_second` AS `limitTimeSecond`
    FROM `eod_configuration`.`data_town`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- Stage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_stage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_stage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `act_number` AS `actNumber`, 
        `stage_number_in_act` AS `stageNumberInAct`, 
        `recommend_atk` AS `recommendAtk`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `stage_gold` AS `stageGold`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `bonus_type` AS `bonusType`, 
        `bonus_value` AS `bonusValue`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level_min` AS `recommendLevelMin`, 
        `recommend_level_max` AS `recommendLevelMax`, 
        `previous_stage_code` AS `previousStageCode`, 
        `next_stage_code` AS `nextStageCode`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `reward_count_min` AS `rewardCountMin`, 
        `reward_count_max` AS `rewardCountMax`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `entry_limit_type` AS `entryLimitType`, 
        `entry_limit_count` AS `entryLimitCount`, 
        `boss_monster_code` AS `bossMonsterCode`, 
        `monster_level` AS `monsterLevel`, 
        `auto_skill_cost` AS `autoSkillCost`, 
        `add_reward_group_code` AS `addRewardGroupCode`
    FROM `eod_configuration`.`data_stage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- EliteStage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_elite_stage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_elite_stage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `act_number` AS `actNumber`, 
        `stage_number_in_act` AS `stageNumberInAct`, 
        `recommend_atk` AS `recommendAtk`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `stage_gold` AS `stageGold`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `bonus_type` AS `bonusType`, 
        `bonus_value` AS `bonusValue`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level_min` AS `recommendLevelMin`, 
        `recommend_level_max` AS `recommendLevelMax`, 
        `previous_stage_code` AS `previousStageCode`, 
        `next_stage_code` AS `nextStageCode`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `reward_count_min` AS `rewardCountMin`, 
        `reward_count_max` AS `rewardCountMax`, 
        `reward_general_code1` AS `rewardGeneralCode1`, 
        `reward_count_min1` AS `rewardCountMin1`, 
        `reward_count_max1` AS `rewardCountMax1`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `entry_limit_type` AS `entryLimitType`, 
        `entry_limit_count` AS `entryLimitCount`, 
        `boss_monster_code` AS `bossMonsterCode`, 
        `monster_level` AS `monsterLevel`, 
        `auto_skill_cost` AS `autoSkillCost`, 
        `add_reward_group_code` AS `addRewardGroupCode`
    FROM `eod_configuration`.`data_elite_stage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- WeeklyStage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_weekly_stage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_weekly_stage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `act_number` AS `actNumber`, 
        `stage_number_in_act` AS `stageNumberInAct`, 
        `day_of_week` AS `dayOfWeek`, 
        `recommend_atk` AS `recommendAtk`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `stage_gold` AS `stageGold`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level` AS `recommendLevel`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `reward_count_min` AS `rewardCountMin`, 
        `reward_count_max` AS `rewardCountMax`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `entry_limit_type` AS `entryLimitType`, 
        `entry_limit_count` AS `entryLimitCount`, 
        `boss_monster_code` AS `bossMonsterCode`, 
        `monster_level` AS `monsterLevel`, 
        `auto_skill_cost` AS `autoSkillCost`, 
        `image_code` AS `imageCode`, 
        `add_reward_group_code` AS `addRewardGroupCode`
    FROM `eod_configuration`.`data_weekly_stage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- WestAreaStage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_west_area_stage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_west_area_stage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `act_number` AS `actNumber`, 
        `stage_number_in_act` AS `stageNumberInAct`, 
        `recommend_atk` AS `recommendAtk`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `stage_gold` AS `stageGold`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `bonus_type` AS `bonusType`, 
        `bonus_value` AS `bonusValue`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level_min` AS `recommendLevelMin`, 
        `recommend_level_max` AS `recommendLevelMax`, 
        `previous_stage_code` AS `previousStageCode`, 
        `next_stage_code` AS `nextStageCode`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `reward_count_min` AS `rewardCountMin`, 
        `reward_count_max` AS `rewardCountMax`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `entry_limit_type` AS `entryLimitType`, 
        `entry_limit_count` AS `entryLimitCount`, 
        `boss_monster_code` AS `bossMonsterCode`, 
        `monster_level` AS `monsterLevel`, 
        `auto_skill_cost` AS `autoSkillCost`, 
        `add_reward_group_code` AS `addRewardGroupCode`
    FROM `eod_configuration`.`data_west_area_stage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- RiftStage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_rift_stage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_rift_stage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `grade` AS `grade`, 
        `wave_number_lv` AS `waveNumberLv`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `stage_gold` AS `stageGold`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `bgm_index` AS `bgmIndex`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level` AS `recommendLevel`, 
        `next_stage_code` AS `nextStageCode`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `reward_count_min` AS `rewardCountMin`, 
        `reward_count_max` AS `rewardCountMax`, 
        `reward_general_code1` AS `rewardGeneralCode1`, 
        `reward_count_min1` AS `rewardCountMin1`, 
        `reward_count_max1` AS `rewardCountMax1`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `entry_limit_type` AS `entryLimitType`, 
        `entry_limit_count` AS `entryLimitCount`, 
        `boss_monster_code` AS `bossMonsterCode`, 
        `monster_level` AS `monsterLevel`, 
        `auto_skill_cost` AS `autoSkillCost`, 
        `add_reward_group_code` AS `addRewardGroupCode`
    FROM `eod_configuration`.`data_rift_stage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- TranscendentStage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_transcendent_stage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_transcendent_stage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `stage_number_in_act` AS `stageNumberInAct`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `boss_spawn_hp_amount` AS `bossSpawnHpAmount`, 
        `stage_gold` AS `stageGold`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `bgm_index` AS `bgmIndex`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level` AS `recommendLevel`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `reward_count_min` AS `rewardCountMin`, 
        `reward_count_max` AS `rewardCountMax`, 
        `first_reward_general_code` AS `firstRewardGeneralCode`, 
        `reward_general_code1` AS `rewardGeneralCode1`, 
        `reward_count_min1` AS `rewardCountMin1`, 
        `reward_count_max1` AS `rewardCountMax1`, 
        `party_reward_group_code` AS `partyRewardGroupCode`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `entry_limit_type` AS `entryLimitType`, 
        `entry_limit_count` AS `entryLimitCount`, 
        `boss_monster_code` AS `bossMonsterCode`, 
        `monster_level` AS `monsterLevel`, 
        `auto_skill_cost` AS `autoSkillCost`, 
        `add_reward_group_code` AS `addRewardGroupCode`
    FROM `eod_configuration`.`data_transcendent_stage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OccupationStage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_occupation_stage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_occupation_stage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `party_user_count` AS `partyUserCount`, 
        `occupation_type` AS `occupationType`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `stage_gold` AS `stageGold`, 
        `stage_reward_code` AS `stageRewardCode`, 
        `reward_item_count` AS `rewardItemCount`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `occupation_open_hour` AS `occupationOpenHour`, 
        `occupation_close_hour` AS `occupationCloseHour`, 
        `start_delay` AS `startDelay`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level_min` AS `recommendLevelMin`, 
        `recommend_level_max` AS `recommendLevelMax`, 
        `party_reward_group_code` AS `partyRewardGroupCode`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `auto_skill_cost` AS `autoSkillCost`
    FROM `eod_configuration`.`data_occupation_stage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- GuardianRaid 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_guardian_raid`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_guardian_raid`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `stage_type` AS `stageType`, 
        `stage_number_in_act` AS `stageNumberInAct`, 
        `atk_ratio` AS `atkRatio`, 
        `def_ratio` AS `defRatio`, 
        `stage_exp` AS `stageExp`, 
        `guardian_exp` AS `guardianExp`, 
        `stage_gold` AS `stageGold`, 
        `auto_connection_skill_gold` AS `autoConnectionSkillGold`, 
        `bgm_index` AS `bgmIndex`, 
        `limit_time_second` AS `limitTimeSecond`, 
        `recommend_level` AS `recommendLevel`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `icon_image_code` AS `iconImageCode`, 
        `reward_count_min` AS `rewardCountMin`, 
        `reward_count_max` AS `rewardCountMax`, 
        `party_reward_group_code` AS `partyRewardGroupCode`, 
        `entry_cost_type` AS `entryCostType`, 
        `entry_cost_amount` AS `entryCostAmount`, 
        `entry_limit_type` AS `entryLimitType`, 
        `entry_limit_count` AS `entryLimitCount`, 
        `monster_level` AS `monsterLevel`, 
        `add_reward_group_code` AS `addRewardGroupCode`
    FROM `eod_configuration`.`data_guardian_raid`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- Monster 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_monster`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_monster`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `target_type_code` AS `targetTypeCode`, 
        `monster_grade_type` AS `monsterGradeType`, 
        `random_monster_level_part` AS `randomMonsterLevelPart`, 
        `hp` AS `hp`, 
        `hp_regeneration_per5_sec` AS `hpRegenerationPer5Sec`, 
        `stm_chrg` AS `stmChrg`, 
        `attk_pow` AS `attkPow`, 
        `attk_spd` AS `attkSpd`, 
        `crt_rt` AS `crtRt`, 
        `ctr_pow` AS `ctrPow`, 
        `crt_pow_decr` AS `crtPowDecr`, 
        `dmg_decr` AS `dmgDecr`, 
        `dfs_pow` AS `dfsPow`, 
        `avd_rt` AS `avdRt`, 
        `accr` AS `accr`, 
        `st_reg` AS `stReg`, 
        `mv_spd` AS `mvSpd`, 
        `dk_frc` AS `dkFrc`
    FROM `eod_configuration`.`data_monster`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- MonsterStandardStatus 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_monster_standard_status`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_monster_standard_status`()
BEGIN
    SELECT
        `level` AS `level`, 
        `hp` AS `hp`, 
        `hp_regeneration_per5_sec` AS `hpRegenerationPer5Sec`, 
        `stm_chrg` AS `stmChrg`, 
        `attk_pow` AS `attkPow`, 
        `attk_spd` AS `attkSpd`, 
        `crt_rt` AS `crtRt`, 
        `ctr_pow` AS `ctrPow`, 
        `crt_pow_decr` AS `crtPowDecr`, 
        `dmg_decr` AS `dmgDecr`, 
        `dfs_pow` AS `dfsPow`, 
        `avd_rt` AS `avdRt`, 
        `accr` AS `accr`, 
        `st_reg` AS `stReg`, 
        `mv_spd` AS `mvSpd`, 
        `dk_frc` AS `dkFrc`
    FROM `eod_configuration`.`data_monster_standard_status`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- MonsterSpawn 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_monster_spawn`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_monster_spawn`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `monster_code` AS `monsterCode`, 
        `level_select_type` AS `levelSelectType`, 
        `level_select_static_value` AS `levelSelectStaticValue`, 
        `level_offset_min` AS `levelOffsetMin`, 
        `level_offset_max` AS `levelOffsetMax`, 
        `spawn_min_radius` AS `spawnMinRadius`, 
        `spawn_max_radius` AS `spawnMaxRadius`, 
        `count` AS `count`
    FROM `eod_configuration`.`data_monster_spawn`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OptionParameter 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_option_parameter`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_option_parameter`()
BEGIN
    SELECT
        `option_division` AS `optionDivision`, 
        `option_parts` AS `optionParts`, 
        `calculate_limit` AS `calculateLimit`, 
        `option_data_type` AS `optionDataType`, 
        `option_sort` AS `optionSort`
    FROM `eod_configuration`.`data_option_parameter`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OptionBase 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_option_base`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_option_base`()
BEGIN
    SELECT
        `option_code` AS `optionCode`, 
        `data_type` AS `dataType`, 
        `option_group_code` AS `optionGroupCode`
    FROM `eod_configuration`.`data_option_base`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OptionGroup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_option_group`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_option_group`()
BEGIN
    SELECT
        `option_group_id` AS `optionGroupId`, 
        `option_division` AS `optionDivision`, 
        `option_attribute_id` AS `optionAttributeId`, 
        `option_numbers` AS `optionNumbers`, 
        `option_target_group` AS `optionTargetGroup`, 
        `option_target_count` AS `optionTargetCount`, 
        `option_target_cons` AS `optionTargetCons`
    FROM `eod_configuration`.`data_option_group`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OptionAttribute 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_option_attribute`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_option_attribute`()
BEGIN
    SELECT
        `option_attribute_id` AS `optionAttributeId`, 
        `option_division` AS `optionDivision`, 
        `option_condition` AS `optionCondition`, 
        `option_overlab` AS `optionOverlab`, 
        `ignore_option_group` AS `ignoreOptionGroup`, 
        `remove_option_group` AS `removeOptionGroup`, 
        `option_apply_rate` AS `optionApplyRate`, 
        `opt_delay` AS `optDelay`, 
        `opt_timer` AS `optTimer`, 
        `option_adjust_type` AS `optionAdjustType`, 
        `option_value_type` AS `optionValueType`, 
        `option_value_min` AS `optionValueMin`, 
        `option_value_max` AS `optionValueMax`, 
        `appply_hit_times` AS `appplyHitTimes`
    FROM `eod_configuration`.`data_option_attribute`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ImmuneOptionGroup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_immune_option_group`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_immune_option_group`()
BEGIN
    SELECT
        `immune_option_group` AS `immuneOptionGroup`, 
        `option_division` AS `optionDivision`, 
        `tec_desc` AS `tecDesc`
    FROM `eod_configuration`.`data_immune_option_group`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- RemoveOptionGroup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_remove_option_group`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_remove_option_group`()
BEGIN
    SELECT
        `remove_option_group` AS `removeOptionGroup`, 
        `option_division` AS `optionDivision`, 
        `tec_desc` AS `tecDesc`
    FROM `eod_configuration`.`data_remove_option_group`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OptionItemRandom 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_option_item_random`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_option_item_random`()
BEGIN
    SELECT
        `option_random_group_id` AS `optionRandomGroupId`, 
        `option_division` AS `optionDivision`, 
        `option_rank` AS `optionRank`, 
        `option_adjust_type` AS `optionAdjustType`, 
        `option_data_type` AS `optionDataType`, 
        `option_value_min` AS `optionValueMin`, 
        `option_value_max` AS `optionValueMax`, 
        `interval` AS `interval`, 
        `option_rate` AS `optionRate`
    FROM `eod_configuration`.`data_option_item_random`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- FixedOptionGroup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_fixed_option_group`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_fixed_option_group`()
BEGIN
    SELECT
        `fixed_option_group_id` AS `fixedOptionGroupId`, 
        `option_division` AS `optionDivision`, 
        `option_rank` AS `optionRank`, 
        `option_adjust_type` AS `optionAdjustType`, 
        `option_data_type` AS `optionDataType`, 
        `option_value_min` AS `optionValueMin`, 
        `option_value_max` AS `optionValueMax`, 
        `interval` AS `interval`, 
        `option_rate` AS `optionRate`
    FROM `eod_configuration`.`data_fixed_option_group`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- RuneOptionGroup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_rune_option_group`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_rune_option_group`()
BEGIN
    SELECT
        `rune_option_group_id` AS `runeOptionGroupId`, 
        `option_division` AS `optionDivision`, 
        `equip_type` AS `equipType`, 
        `option_adjust_type` AS `optionAdjustType`, 
        `option_data_type` AS `optionDataType`, 
        `option_value_min` AS `optionValueMin`, 
        `option_value_max` AS `optionValueMax`, 
        `interval` AS `interval`, 
        `option_rate` AS `optionRate`
    FROM `eod_configuration`.`data_rune_option_group`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- RandomOptionChange 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_random_option_change`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_random_option_change`()
BEGIN
    SELECT
        `random_option_change_code` AS `randomOptionChangeCode`, 
        `option_random_group_id` AS `optionRandomGroupId`, 
        `equip_type` AS `equipType`, 
        `item_division` AS `itemDivision`, 
        `item_grade` AS `itemGrade`, 
        `grade` AS `grade`, 
        `gem_need_item1` AS `gemNeedItem1`, 
        `gem_item_count1` AS `gemItemCount1`, 
        `charge_cost` AS `chargeCost`, 
        `rune_need_item1` AS `runeNeedItem1`, 
        `rune_item_count1` AS `runeItemCount1`, 
        `rune_need_item2` AS `runeNeedItem2`, 
        `rune_item_count2` AS `runeItemCount2`, 
        `rune_need_item3` AS `runeNeedItem3`, 
        `rune_item_count3` AS `runeItemCount3`
    FROM `eod_configuration`.`data_random_option_change`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- Character 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_character`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_character`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `class_type` AS `classType`, 
        `class_type_number` AS `classTypeNumber`, 
        `slot_open` AS `slotOpen`, 
        `slot_open_level` AS `slotOpenLevel`, 
        `create_level` AS `createLevel`
    FROM `eod_configuration`.`data_character`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- PlayerBaseStatus 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_player_base_status`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_player_base_status`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `class_type` AS `classType`, 
        `level` AS `level`, 
        `hp` AS `hp`, 
        `stm` AS `stm`, 
        `matrix_use_stm` AS `matrixUseStm`, 
        `matrix_maintain_time` AS `matrixMaintainTime`, 
        `matrix_slow_pecent` AS `matrixSlowPecent`, 
        `matrix_cool_time` AS `matrixCoolTime`, 
        `hp_regeneration_per5_sec` AS `hpRegenerationPer5Sec`, 
        `stm_chrg` AS `stmChrg`, 
        `attk_pow_min` AS `attkPowMin`, 
        `attk_pow_max` AS `attkPowMax`, 
        `attk_spd` AS `attkSpd`, 
        `crt_rt` AS `crtRt`, 
        `ctr_pow` AS `ctrPow`, 
        `crt_pow_decr` AS `crtPowDecr`, 
        `dmg_decr` AS `dmgDecr`, 
        `dfs_pow` AS `dfsPow`, 
        `avd_rt` AS `avdRt`, 
        `accr` AS `accr`, 
        `st_reg` AS `stReg`, 
        `cool_decr` AS `coolDecr`, 
        `mv_spd` AS `mvSpd`, 
        `dv_frc` AS `dvFrc`
    FROM `eod_configuration`.`data_player_base_status`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- PlayerLevelExperience 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_player_level_experience`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_player_level_experience`()
BEGIN
    SELECT
        `level` AS `level`, 
        `need_experience` AS `needExperience`, 
        `need_experience_to_next_level` AS `needExperienceToNextLevel`, 
        `skill_point` AS `skillPoint`, 
        `key_save` AS `keySave`, 
        `key_regen_time` AS `keyRegenTime`, 
        `key_gift` AS `keyGift`
    FROM `eod_configuration`.`data_player_level_experience`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- CharacterGuardianLevel 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_character_guardian_level`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_character_guardian_level`()
BEGIN
    SELECT
        `guardianlevel` AS `guardianlevel`, 
        `g_accumulation_exp` AS `gAccumulationExp`, 
        `g_need_next_exp` AS `gNeedNextExp`, 
        `g_skill_dision` AS `gSkillDision`, 
        `g_reward_skill_point` AS `gRewardSkillPoint`, 
        `add_hp` AS `addHp`, 
        `add_def` AS `addDef`
    FROM `eod_configuration`.`data_character_guardian_level`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- StageReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_stage_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_stage_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_stage_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- EliteStageReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_elite_stage_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_elite_stage_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_elite_stage_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- WestAreaStageReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_west_area_stage_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_west_area_stage_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_west_area_stage_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- WeeklyStageReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_weekly_stage_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_weekly_stage_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_weekly_stage_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- RiftStageReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_rift_stage_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_rift_stage_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_rift_stage_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- RiftStageRiftStoneReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_rift_stage_rift_stone_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_rift_stage_rift_stone_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_rift_stage_rift_stone_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- TranscendentStageReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_transcendent_stage_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_transcendent_stage_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_transcendent_stage_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- TranscendentGuardianStoneReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_transcendent_guardian_stone_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_transcendent_guardian_stone_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_transcendent_guardian_stone_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- PartyContributivenessReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_party_contributiveness_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_party_contributiveness_reward`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `party_reward_group_code` AS `partyRewardGroupCode`, 
        `party_user_count` AS `partyUserCount`, 
        `party_play_rank_type` AS `partyPlayRankType`, 
        `combat_rank` AS `combatRank`, 
        `add_exp_rate` AS `addExpRate`, 
        `reward_code` AS `rewardCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`
    FROM `eod_configuration`.`data_party_contributiveness_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- PVPRanking 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_pvp_ranking`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_pvp_ranking`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `rank_grade` AS `rankGrade`, 
        `min_count` AS `minCount`, 
        `max_count` AS `maxCount`, 
        `min_rate` AS `minRate`, 
        `max_rate` AS `maxRate`, 
        `season_gem_reward` AS `seasonGemReward`, 
        `season_item_reward_gtc` AS `seasonItemRewardGtc`, 
        `season_item_reward_count` AS `seasonItemRewardCount`
    FROM `eod_configuration`.`data_pvp_ranking`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ActRewardInfo 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_act_reward_info`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_act_reward_info`()
BEGIN
    SELECT
        `act_general_code` AS `actGeneralCode`, 
        `e_stage_type` AS `eStageType`, 
        `act_no` AS `actNo`, 
        `first_reward_gem_code` AS `firstRewardGemCode`, 
        `gem_repetition_count` AS `gemRepetitionCount`, 
        `gem_count` AS `gemCount`, 
        `reward_gold_code` AS `rewardGoldCode`, 
        `gold_repetition_count` AS `goldRepetitionCount`, 
        `gold_count` AS `goldCount`
    FROM `eod_configuration`.`data_act_reward_info`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ActClearGradeReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_act_clear_grade_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_act_clear_grade_reward`()
BEGIN
    SELECT
        `act_general_code` AS `actGeneralCode`, 
        `act_no` AS `actNo`, 
        `need_star_count1` AS `needStarCount1`, 
        `general_type_code1` AS `generalTypeCode1`, 
        `item_count1` AS `itemCount1`, 
        `need_star_count2` AS `needStarCount2`, 
        `general_type_code2` AS `generalTypeCode2`, 
        `item_count2` AS `itemCount2`, 
        `need_star_count3` AS `needStarCount3`, 
        `general_type_code3` AS `generalTypeCode3`, 
        `item_count3` AS `itemCount3`, 
        `need_star_count4` AS `needStarCount4`, 
        `general_type_code4` AS `generalTypeCode4`, 
        `item_count4` AS `itemCount4`
    FROM `eod_configuration`.`data_act_clear_grade_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- AttendanceReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_attendance_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_attendance_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `attendance_type` AS `attendanceType`, 
        `attendance_num` AS `attendanceNum`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_count` AS `itemCount`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_attendance_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OccupationReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_occupation_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_occupation_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `occupation_type` AS `occupationType`, 
        `win_count` AS `winCount`, 
        `win_count_min_range` AS `winCountMinRange`, 
        `win_count_max_range` AS `winCountMaxRange`, 
        `season_gem_reward` AS `seasonGemReward`, 
        `season_item_reward_gtc` AS `seasonItemRewardGtc`, 
        `season_item_reward_count` AS `seasonItemRewardCount`
    FROM `eod_configuration`.`data_occupation_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- AddReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_add_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_add_reward`()
BEGIN
    SELECT
        `add_reward_group_code` AS `addRewardGroupCode`, 
        `group_type` AS `groupType`, 
        `drop_rate_type` AS `dropRateType`, 
        `required_class` AS `requiredClass`, 
        `general_type_code` AS `generalTypeCode`, 
        `drop_rate` AS `dropRate`, 
        `drop_item_count_min` AS `dropItemCountMin`, 
        `drop_item_count_max` AS `dropItemCountMax`, 
        `acquisition_route_text_code` AS `acquisitionRouteTextCode`
    FROM `eod_configuration`.`data_add_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- GuardianRaidReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_guardian_raid_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_guardian_raid_reward`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `required_class` AS `requiredClass`, 
        `act` AS `act`, 
        `stage_no` AS `stageNo`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`, 
        `equip_type` AS `equipType`, 
        `grade` AS `grade`
    FROM `eod_configuration`.`data_guardian_raid_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- GuildWarReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_guild_war_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_guild_war_reward`()
BEGIN
    SELECT
        `reward_type` AS `rewardType`, 
        `reward_general_code` AS `rewardGeneralCode`, 
        `stage_general_code` AS `stageGeneralCode`, 
        `rank_grade` AS `rankGrade`, 
        `required_class` AS `requiredClass`, 
        `general_type_code` AS `generalTypeCode`, 
        `item_min_count` AS `itemMinCount`, 
        `item_max_count` AS `itemMaxCount`, 
        `drop_rate` AS `dropRate`
    FROM `eod_configuration`.`data_guild_war_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- GuildWarRanking 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_guild_war_ranking`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_guild_war_ranking`()
BEGIN
    SELECT
        `reward_general_code` AS `rewardGeneralCode`, 
        `reward_type` AS `rewardType`, 
        `rank_grade` AS `rankGrade`, 
        `require_point_min` AS `requirePointMin`, 
        `require_point_max` AS `requirePointMax`, 
        `min_count` AS `minCount`, 
        `max_count` AS `maxCount`, 
        `min_rate` AS `minRate`, 
        `max_rate` AS `maxRate`, 
        `season_item_reward_gtc` AS `seasonItemRewardGtc`, 
        `season_item_reward_count` AS `seasonItemRewardCount`, 
        `season_item_reward2gtc` AS `seasonItemReward2gtc`, 
        `season_item_reward2_count` AS `seasonItemReward2Count`, 
        `season_item_reward3gtc` AS `seasonItemReward3gtc`, 
        `season_item_reward3_count` AS `seasonItemReward3Count`, 
        `season_item_reward4gtc` AS `seasonItemReward4gtc`, 
        `season_item_reward4_count` AS `seasonItemReward4Count`, 
        `season_item_reward5gtc` AS `seasonItemReward5gtc`, 
        `season_item_reward5_count` AS `seasonItemReward5Count`, 
        `icon_image_code` AS `iconImageCode`
    FROM `eod_configuration`.`data_guild_war_ranking`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopEventPackage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_event_package`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_event_package`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `product_id` AS `productId`, 
        `market_type` AS `marketType`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `limited_num` AS `limitedNum`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`, 
        `product1_type_code` AS `product1TypeCode`, 
        `product1_amount` AS `product1Amount`, 
        `product2_type_code` AS `product2TypeCode`, 
        `product2_amount` AS `product2Amount`, 
        `product3_type_code` AS `product3TypeCode`, 
        `product3_amount` AS `product3Amount`, 
        `product4_type_code` AS `product4TypeCode`, 
        `product4_amount` AS `product4Amount`, 
        `product5_type_code` AS `product5TypeCode`, 
        `product5_amount` AS `product5Amount`, 
        `product6_type_code` AS `product6TypeCode`, 
        `product6_amount` AS `product6Amount`
    FROM `eod_configuration`.`data_shop_event_package`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopPackage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_package`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_package`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `product_id` AS `productId`, 
        `market_type` AS `marketType`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `limited_num` AS `limitedNum`, 
        `initialization_type` AS `initializationType`, 
        `initialization_time` AS `initializationTime`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`, 
        `product1_type_code` AS `product1TypeCode`, 
        `product1_amount` AS `product1Amount`, 
        `product2_type_code` AS `product2TypeCode`, 
        `product2_amount` AS `product2Amount`, 
        `product3_type_code` AS `product3TypeCode`, 
        `product3_amount` AS `product3Amount`, 
        `product4_type_code` AS `product4TypeCode`, 
        `product4_amount` AS `product4Amount`, 
        `product5_type_code` AS `product5TypeCode`, 
        `product5_amount` AS `product5Amount`, 
        `product6_type_code` AS `product6TypeCode`, 
        `product6_amount` AS `product6Amount`
    FROM `eod_configuration`.`data_shop_package`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopPremiumPackage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_premium_package`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_premium_package`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `product_id` AS `productId`, 
        `market_type` AS `marketType`, 
        `next_step_code` AS `nextStepCode`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `limited_num` AS `limitedNum`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`, 
        `product1_type_code` AS `product1TypeCode`, 
        `product1_amount` AS `product1Amount`, 
        `product2_type_code` AS `product2TypeCode`, 
        `product2_amount` AS `product2Amount`, 
        `product3_type_code` AS `product3TypeCode`, 
        `product3_amount` AS `product3Amount`, 
        `product4_type_code` AS `product4TypeCode`, 
        `product4_amount` AS `product4Amount`, 
        `product5_type_code` AS `product5TypeCode`, 
        `product5_amount` AS `product5Amount`, 
        `product6_type_code` AS `product6TypeCode`, 
        `product6_amount` AS `product6Amount`
    FROM `eod_configuration`.`data_shop_premium_package`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopLevelupPackage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_levelup_package`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_levelup_package`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `product_id` AS `productId`, 
        `market_type` AS `marketType`, 
        `character_lv` AS `characterLv`, 
        `guardian_lv` AS `guardianLv`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `limited_num` AS `limitedNum`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`, 
        `product1_type_code` AS `product1TypeCode`, 
        `product1_amount` AS `product1Amount`, 
        `product2_type_code` AS `product2TypeCode`, 
        `product2_amount` AS `product2Amount`, 
        `product3_type_code` AS `product3TypeCode`, 
        `product3_amount` AS `product3Amount`, 
        `product4_type_code` AS `product4TypeCode`, 
        `product4_amount` AS `product4Amount`, 
        `product5_type_code` AS `product5TypeCode`, 
        `product5_amount` AS `product5Amount`, 
        `product6_type_code` AS `product6TypeCode`, 
        `product6_amount` AS `product6Amount`
    FROM `eod_configuration`.`data_shop_levelup_package`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopGacha 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_gacha`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_gacha`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `icon_image_code` AS `iconImageCode`, 
        `pull_count` AS `pullCount`, 
        `gacha_reward_code` AS `gachaRewardCode`, 
        `re_purchase_count` AS `rePurchaseCount`, 
        `gacha_type` AS `gachaType`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`, 
        `gacha_grade_group_code` AS `gachaGradeGroupCode`, 
        `bonus_gacha_grade_group_code` AS `bonusGachaGradeGroupCode`, 
        `add_reward_item_code` AS `addRewardItemCode`, 
        `add_reward_item_count` AS `addRewardItemCount`, 
        `free_gacha_delay_time` AS `freeGachaDelayTime`, 
        `free_gacha_max_count` AS `freeGachaMaxCount`
    FROM `eod_configuration`.`data_shop_gacha`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- GachaReward 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_gacha_reward`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_gacha_reward`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `count` AS `count`, 
        `product1_type_code` AS `product1TypeCode`, 
        `product1_amount` AS `product1Amount`, 
        `product2_type_code` AS `product2TypeCode`, 
        `product2_amount` AS `product2Amount`, 
        `product3_type_code` AS `product3TypeCode`, 
        `product3_amount` AS `product3Amount`, 
        `product4_type_code` AS `product4TypeCode`, 
        `product4_amount` AS `product4Amount`
    FROM `eod_configuration`.`data_gacha_reward`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopGachaGradeGroup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_gacha_grade_group`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_gacha_grade_group`()
BEGIN
    SELECT
        `gacha_grade_group_code` AS `gachaGradeGroupCode`, 
        `gacha_item_group_code` AS `gachaItemGroupCode`, 
        `group_rate` AS `groupRate`
    FROM `eod_configuration`.`data_shop_gacha_grade_group`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopGachaItemGroup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_gacha_item_group`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_gacha_item_group`()
BEGIN
    SELECT
        `gacha_item_group_code` AS `gachaItemGroupCode`, 
        `item_code` AS `itemCode`, 
        `item_count` AS `itemCount`, 
        `required_class` AS `requiredClass`, 
        `group_rate` AS `groupRate`
    FROM `eod_configuration`.`data_shop_gacha_item_group`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopGemCharge 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_gem_charge`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_gem_charge`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `product_id` AS `productId`, 
        `market_type` AS `marketType`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `charge_type_code` AS `chargeTypeCode`, 
        `charge_amount` AS `chargeAmount`, 
        `add_amount` AS `addAmount`, 
        `charge_type_code2` AS `chargeTypeCode2`, 
        `charge_amount2` AS `chargeAmount2`, 
        `add_amount2` AS `addAmount2`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`, 
        `bonus1_type_code` AS `bonus1TypeCode`, 
        `bonus1_amount` AS `bonus1Amount`, 
        `bonus2_type_code` AS `bonus2TypeCode`, 
        `bonus2_amount` AS `bonus2Amount`, 
        `bonus3_type_code` AS `bonus3TypeCode`, 
        `bonus3_amount` AS `bonus3Amount`, 
        `bonus4_type_code` AS `bonus4TypeCode`, 
        `bonus4_amount` AS `bonus4Amount`, 
        `bonus5_type_code` AS `bonus5TypeCode`, 
        `bonus5_amount` AS `bonus5Amount`
    FROM `eod_configuration`.`data_shop_gem_charge`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopGoldExchange 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_gold_exchange`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_gold_exchange`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `exchage_type_code` AS `exchageTypeCode`, 
        `exchage_amount` AS `exchageAmount`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`
    FROM `eod_configuration`.`data_shop_gold_exchange`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopAdmissionBuy 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_admission_buy`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_admission_buy`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `exchage_type_code` AS `exchageTypeCode`, 
        `exchage_amount` AS `exchageAmount`, 
        `mileage_type_code` AS `mileageTypeCode`, 
        `mileage_amount` AS `mileageAmount`, 
        `free_gacha_delay_time` AS `freeGachaDelayTime`, 
        `free_gacha_max_count` AS `freeGachaMaxCount`
    FROM `eod_configuration`.`data_shop_admission_buy`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopGuild 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_guild`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_guild`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `exchage_type_code` AS `exchageTypeCode`, 
        `exchage_amount` AS `exchageAmount`
    FROM `eod_configuration`.`data_shop_guild`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- ShopMileageExchnage 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_shop_mileage_exchnage`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_shop_mileage_exchnage`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `price_type` AS `priceType`, 
        `price` AS `price`, 
        `exchage_type_code` AS `exchageTypeCode`, 
        `exchage_amount` AS `exchageAmount`
    FROM `eod_configuration`.`data_shop_mileage_exchnage`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- SkillType 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_skill_type`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_skill_type`()
BEGIN
    SELECT
        `skill_code` AS `skillCode`, 
        `skill_type` AS `skillType`, 
        `required_class` AS `requiredClass`, 
        `skill_level_limit` AS `skillLevelLimit`, 
        `debuff_state_skill` AS `debuffStateSkill`, 
        `add_skill_combo` AS `addSkillCombo`
    FROM `eod_configuration`.`data_skill_type`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- PassiveSkill 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_passive_skill`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_passive_skill`()
BEGIN
    SELECT
        `skill_code` AS `skillCode`, 
        `character_code` AS `characterCode`, 
        `open_level` AS `openLevel`, 
        `skill_level_limit` AS `skillLevelLimit`, 
        `need_skill_point_type` AS `needSkillPointType`, 
        `need_skill_point` AS `needSkillPoint`, 
        `option_code` AS `optionCode`, 
        `option_base_value` AS `optionBaseValue`, 
        `option_up_add` AS `optionUpAdd`
    FROM `eod_configuration`.`data_passive_skill`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- SkillLevelup 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_skill_levelup`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_skill_levelup`()
BEGIN
    SELECT
        `skill_code` AS `skillCode`, 
        `projectile_division_index` AS `projectileDivisionIndex`, 
        `skill_level` AS `skillLevel`, 
        `need_skill_point_type` AS `needSkillPointType`, 
        `need_skill_point` AS `needSkillPoint`
    FROM `eod_configuration`.`data_skill_levelup`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- SuccessionSkill 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_succession_skill`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_succession_skill`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `open_condition` AS `openCondition`, 
        `open_level` AS `openLevel`, 
        `skill_level_limit` AS `skillLevelLimit`, 
        `link_skill_upgrade_item` AS `linkSkillUpgradeItem`, 
        `upgrad_item_code` AS `upgradItemCode`, 
        `upgrad_item_count` AS `upgradItemCount`
    FROM `eod_configuration`.`data_succession_skill`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- OptionBase 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_option_base`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_option_base`()
BEGIN
    SELECT
        `option_code` AS `optionCode`, 
        `data_type` AS `dataType`, 
        `option_group_code` AS `optionGroupCode`
    FROM `eod_configuration`.`data_option_base`;
END$$
DELIMITER ;

-- --------------------------------------------------------------------------------
-- DefaultValue 데이터 스크립트의 내용을 불러오는 저장 프로시저 생성
-- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS `eod_configuration`.`sp_load_data_table_default_value`;
DELIMITER $$
CREATE PROCEDURE `sp_load_data_table_default_value`()
BEGIN
    SELECT
        `general_type_code` AS `generalTypeCode`, 
        `value` AS `value`
    FROM `eod_configuration`.`data_default_value`;
END$$
DELIMITER ;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
