--
-- Host: 210.175.73.245    Database: mydb_gamble
-- ------------------------------------------------------

 SET NAMES utf8 ;

--
-- Table structure for table `KP_BTCH_HIST`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_BTCH_HIST` (
  `BTCH_HIST_IDX` bigint(21) unsigned NOT NULL AUTO_INCREMENT COMMENT 'IDX',
  `BTCH_PLTF` enum('P','A') NOT NULL DEFAULT 'P' COMMENT '배치 플랫폼 (P : 포털, A: 어드민)',
  `BTCH_NM` varchar(50) NOT NULL COMMENT '배치 명',
  `BTCH_DESC` varchar(500) DEFAULT NULL COMMENT '배치 설명',
  `STRT_DTM` datetime(3) NOT NULL DEFAULT current_timestamp(3) COMMENT '시작 일시',
  `END_DTM` datetime(3) DEFAULT current_timestamp(3) COMMENT '종료 일시',
  `IS_SUCC` enum('Y','N') NOT NULL DEFAULT 'N' COMMENT '성공 유무 (Y : 성공, N: 실패)',
  `FAIL_LOG` mediumtext DEFAULT NULL COMMENT '실패 로그',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록 일시',
  PRIMARY KEY (`BTCH_HIST_IDX`)
) ENGINE=InnoDB AUTO_INCREMENT=89830 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배치 이력 테이블';

--
-- Table structure for table `KP_CSN_BET_HIST`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_CSN_BET_HIST` (
  `CSN_BET_IDX` bigint(21) unsigned NOT NULL AUTO_INCREMENT COMMENT 'IDX',
  `TYPE` enum('B','W','C','L','I','P','J') NOT NULL DEFAULT 'B' COMMENT '타입 (B: 배팅, W: 승리, C: 취소, L: 낙첨, I: 인게임보너스, P: 프로모션보너스, J: 잭팟보너스 )',
  `MBR_IDX` bigint(21) unsigned NOT NULL COMMENT '회원 IDX',
  `HLD_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '보유 머니',
  `BET_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '배팅 머니',
  `RSLT_MNY` int(10) NOT NULL DEFAULT 0 COMMENT '결과 머니 (배팅 : -, 승리 : +, 취소 : 0)',
  `PRD_ID` tinyint(3) unsigned NOT NULL COMMENT 'API 제공 제품 ID',
  `GAME_ID` int(5) unsigned NOT NULL COMMENT 'API 제공 게임 ID',
  `TRX_ID` varchar(500) NOT NULL COMMENT 'API 제공 트랜잭션 ID',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  `MOD_DTM` datetime DEFAULT NULL COMMENT '수정일',
  `IS_CALC` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '정산 유무 (0: 미정산, 1:정산)',
  `CALC_DTM` datetime DEFAULT NULL COMMENT '정산 일시',
  PRIMARY KEY (`CSN_BET_IDX`),
  KEY `MBR_IDX_INDEX` (`CSN_BET_IDX`),
  KEY `TYPE_INDEX` (`TYPE`),
  KEY `REG_DTM_INDEX` (`REG_DTM`),
  KEY `TRX_ID_INDEX` (`TRX_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=949429 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='카지노 배팅 테이블';

--
-- Table structure for table `KP_CSN_BET_HIST_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_CSN_BET_HIST_backup` (
  `CSN_BET_IDX` bigint(21) unsigned NOT NULL DEFAULT 0 COMMENT 'IDX',
  `TYPE` enum('B','W','C','L','I','P','J') NOT NULL DEFAULT 'B' COMMENT '타입 (B: 배팅, W: 승리, C: 취소, L: 낙첨, I: 인게임보너스, P: 프로모션보너스, J: 잭팟보너스 )',
  `MBR_IDX` bigint(21) unsigned NOT NULL COMMENT '회원 IDX',
  `HLD_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '보유 머니',
  `BET_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '배팅 머니',
  `RSLT_MNY` int(10) NOT NULL DEFAULT 0 COMMENT '결과 머니 (배팅 : -, 승리 : +, 취소 : 0)',
  `PRD_ID` tinyint(3) unsigned NOT NULL COMMENT 'API 제공 제품 ID',
  `GAME_ID` int(5) unsigned NOT NULL COMMENT 'API 제공 게임 ID',
  `TRX_ID` varchar(500) NOT NULL COMMENT 'API 제공 트랜잭션 ID',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  `MOD_DTM` datetime DEFAULT NULL COMMENT '수정일',
  `IS_CALC` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '정산 유무 (0: 미정산, 1:정산)',
  `CALC_DTM` datetime DEFAULT NULL COMMENT '정산 일시'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `KP_ESPT_BET_HIST`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_ESPT_BET_HIST` (
  `SLOT_BET_IDX` bigint(21) unsigned NOT NULL AUTO_INCREMENT COMMENT 'IDX',
  `TYPE` enum('B','W','C','L','I','P','J') NOT NULL DEFAULT 'B' COMMENT '타입 (B: 배팅, W: 승리, C: 취소, L: 낙첨, I: 인게임보너스, P: 프로모션보너스, J: 잭팟보너스 )',
  `MBR_IDX` bigint(21) unsigned NOT NULL COMMENT '회원 IDX',
  `HLD_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '보유 머니',
  `BET_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '배팅 머니',
  `RSLT_MNY` int(10) NOT NULL DEFAULT 0 COMMENT '결과 머니 (배팅 : -, 승리 : +, 취소 : 0)',
  `PRD_ID` tinyint(3) unsigned NOT NULL COMMENT 'API 제공 제품 ID',
  `GAME_ID` int(5) unsigned NOT NULL COMMENT 'API 제공 게임 ID',
  `TRX_ID` varchar(500) NOT NULL COMMENT 'API 제공 트랜잭션 ID',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  `MOD_DTM` datetime DEFAULT NULL COMMENT '수정일',
  `IS_CALC` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '정산 유무 (0: 미정산, 1:정산)',
  `CALC_DTM` datetime DEFAULT NULL COMMENT '정산 일시',
  PRIMARY KEY (`SLOT_BET_IDX`),
  KEY `MBR_IDX_INDEX` (`SLOT_BET_IDX`),
  KEY `REG_DTM_INDEX` (`REG_DTM`),
  KEY `TRX_ID_INDEX` (`TRX_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=85865 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='슬롯 배팅 테이블';

--
-- Table structure for table `KP_GAME_INF`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_GAME_INF` (
  `GAME_IDX` bigint(21) unsigned NOT NULL AUTO_INCREMENT COMMENT 'IDX',
  `PRD_ID` tinyint(3) unsigned NOT NULL COMMENT 'API 제공 제품 ID',
  `GAME_ID` int(5) unsigned NOT NULL COMMENT 'API 제공 게임 ID',
  `GAME_NM` varchar(50) NOT NULL COMMENT '게임 명 (한글)',
  `IMG_URL` varchar(500) NOT NULL DEFAULT '/images/common/no_image.png' COMMENT '이미지 URL',
  `IS_USE` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '사용 유무 (0: 미사용, 1: 사용)',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일시',
  PRIMARY KEY (`GAME_IDX`)
) ENGINE=InnoDB AUTO_INCREMENT=291 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='게임 정보 테이블';

--
-- Table structure for table `KP_MBR_INF`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_MBR_INF` (
  `MBR_IDX` bigint(21) unsigned NOT NULL COMMENT 'member 테이블 idx',
  `KP_ID` bigint(21) unsigned NOT NULL COMMENT 'KPlay user_id',
  `KP_NM` varchar(100) NOT NULL COMMENT 'KPlay user_name',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  PRIMARY KEY (`MBR_IDX`),
  KEY `idx_kp_id` (`KP_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='KPlay 회원 정보 테이블';

--
-- Table structure for table `KP_PRD_INF`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_PRD_INF` (
  `PRD_ID` tinyint(3) unsigned NOT NULL COMMENT 'API 제공 제품 ID',
  `TYPE` enum('C','S','E') NOT NULL COMMENT '타입 (C: 카지노, S: 슬롯, E: 이스포츠)',
  `PRD_NM` varchar(50) NOT NULL COMMENT '제품 명 (한글)',
  `IMG_URL` varchar(500) NOT NULL DEFAULT '/images/common/no_image.png' COMMENT '이미지 URL',
  `IS_USE` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '사용 유무 (0: 미사용, 1: 사용)',
  `SORT_NUM` tinyint(3) unsigned NOT NULL COMMENT '정렬 번호',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일시',
  PRIMARY KEY (`PRD_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='제품 정보 테이블';

--
-- Table structure for table `KP_SLOT_BET_HIST`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `KP_SLOT_BET_HIST` (
  `SLOT_BET_IDX` bigint(21) unsigned NOT NULL AUTO_INCREMENT COMMENT 'IDX',
  `TYPE` enum('B','W','C','L','I','P','J') NOT NULL DEFAULT 'B' COMMENT '타입 (B: 배팅, W: 승리, C: 취소, L: 낙첨, I: 인게임보너스, P: 프로모션보너스, J: 잭팟보너스 )',
  `MBR_IDX` bigint(21) unsigned NOT NULL COMMENT '회원 IDX',
  `HLD_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '보유 머니',
  `BET_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '배팅 머니',
  `RSLT_MNY` int(10) NOT NULL DEFAULT 0 COMMENT '결과 머니 (배팅 : -, 승리 : +, 취소 : 0)',
  `PRD_ID` tinyint(3) unsigned NOT NULL COMMENT 'API 제공 제품 ID',
  `GAME_ID` int(5) unsigned NOT NULL COMMENT 'API 제공 게임 ID',
  `TRX_ID` varchar(500) NOT NULL COMMENT 'API 제공 트랜잭션 ID',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  `MOD_DTM` datetime DEFAULT NULL COMMENT '수정일',
  `IS_CALC` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '정산 유무 (0: 미정산, 1:정산)',
  `CALC_DTM` datetime DEFAULT NULL COMMENT '정산 일시',
  PRIMARY KEY (`SLOT_BET_IDX`),
  KEY `MBR_IDX_INDEX` (`SLOT_BET_IDX`),
  KEY `REG_DTM_INDEX` (`REG_DTM`),
  KEY `TRX_ID_INDEX` (`TRX_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=403306 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='슬롯 배팅 테이블';

--
-- Table structure for table `OD_HASH_BET_HIST`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `OD_HASH_BET_HIST` (
  `HASH_BET_IDX` bigint(21) unsigned NOT NULL AUTO_INCREMENT COMMENT 'IDX',
  `TYPE` enum('B','W','L') NOT NULL DEFAULT 'B' COMMENT '타입 (B: 배팅, W: 승리, L: 낙첨)',
  `MBR_IDX` bigint(21) unsigned NOT NULL COMMENT '회원 IDX',
  `HLD_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '보유 머니',
  `BET_MNY` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '배팅 머니',
  `RSLT_MNY` int(10) NOT NULL DEFAULT 0 COMMENT '결과 머니 (배팅 : -, 승리 : +, 취소 : 0)',
  `PRD_TYPE` enum('B','R','H') NOT NULL COMMENT '타입 (B: 바카라, R: 룰렛, H: 하이로우)',
  `WAVE` bigint(21) unsigned NOT NULL COMMENT '게임 회차',
  `REG_DTM` datetime NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  `MOD_DTM` datetime DEFAULT NULL COMMENT '수정일',
  `IS_CALC` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '정산 유무 (0: 미정산, 1:정산)',
  `CALC_DTM` datetime DEFAULT NULL COMMENT '정산 일시',
  `CH_CODE` varchar(45) DEFAULT NULL COMMENT '채널 : 바카라용',
  `BT_TYPE` varchar(45) DEFAULT NULL COMMENT '배팅타입 : 하이로우',
  `BT_TYPE_LB` varchar(45) DEFAULT NULL COMMENT '베팅타입라벨 : 하이로우',
  PRIMARY KEY (`HASH_BET_IDX`),
  KEY `REG_DTM_INDEX` (`REG_DTM`),
  KEY `MBR_IDX_INDEX` (`MBR_IDX`),
  KEY `WAVE_IDX` (`WAVE`),
  KEY `TYPE_IDX` (`TYPE`)
) ENGINE=InnoDB AUTO_INCREMENT=51328 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='슬롯 배팅 테이블';

--
-- Table structure for table `account`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `account` (
  `idx` int(11) NOT NULL,
  `account_code` varchar(45) DEFAULT NULL,
  `account_name` varchar(45) DEFAULT NULL,
  `bank_id` int(11) DEFAULT 0,
  `bank_code` varchar(45) DEFAULT '',
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='금융기관 기본 코드 테이블 ';

--
-- Table structure for table `account_level_list`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `account_level_list` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `level` int(11) DEFAULT NULL COMMENT '전용 계좌 레벨 (member 레벨) ',
  `account_name` varchar(45) DEFAULT NULL,
  `account_bank` varchar(45) DEFAULT NULL COMMENT '은행명',
  `account_number` varchar(45) DEFAULT NULL COMMENT '계좌 번호 ',
  `display_account_bank` varchar(45) DEFAULT '',
  `bank_id` int(11) DEFAULT 0,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`idx`),
  UNIQUE KEY `UQ_ACCOUNT_LEVEL_01` (`level`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='회원 레벨 별 전용 계좌 목록 ';

--
-- Table structure for table `average_dividend_provider`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `average_dividend_provider` (
  `sports_id` int(11) NOT NULL,
  `provider` varchar(128) NOT NULL COMMENT '제외할 프로바이더',
  PRIMARY KEY (`sports_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='평균베당 제외할 프로바이더';

--
-- Table structure for table `banners`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `banners` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `thumbnail` varchar(1024) DEFAULT '',
  `display_type` tinyint(1) DEFAULT NULL COMMENT '표시 타입 (1: PC, 2: 모바일)',
  `status` tinyint(4) DEFAULT 1 COMMENT '0-미사용, 1-사용',
  `rank` tinyint(1) DEFAULT NULL COMMENT '배너순번',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  KEY `thumbnail` (`thumbnail`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배너 테이블';

--
-- Table structure for table `base_rule`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `base_rule` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `bet_type` int(11) DEFAULT 0 COMMENT '1 : 프리매치 2: 실시간 3 : 파워볼,4파워사다리 5: 키노사다리 6 : 가상축구 ',
  `id` int(11) NOT NULL DEFAULT 0,
  `name` varchar(32) DEFAULT NULL COMMENT '종목명',
  `result_process` varchar(16) NOT NULL COMMENT '결과처리',
  `end_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '마감시간',
  `max_dividend` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '최대배당',
  `betting_regulation` text DEFAULT NULL COMMENT '배팅규제',
  PRIMARY KEY (`idx`),
  KEY `idx_bet_type` (`bet_type`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `base_rule_2`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `base_rule_2` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(16) DEFAULT NULL COMMENT '구분',
  `contents` text DEFAULT NULL COMMENT '내용',
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `business_type`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `business_type` (
  `id` int(11) NOT NULL DEFAULT 0 COMMENT '1 : 유저,10 : 대총판 , 11 : 총판 , 12 : 하위총판',
  `low_id` int(11) DEFAULT 0,
  `high_id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT '',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `category_rule`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `category_rule` (
  `category` int(10) unsigned NOT NULL COMMENT '카테고리 (1: 실시간, 2: 스포츠, 3: 미니게임)',
  `sub_category` int(10) unsigned NOT NULL COMMENT '하위 카테고리 (코드 참조)',
  `title` varchar(255) NOT NULL COMMENT '제목',
  `content` mediumtext NOT NULL COMMENT '내용',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp() COMMENT '생성일',
  `update_dt` datetime DEFAULT NULL COMMENT '수정일',
  PRIMARY KEY (`category`,`sub_category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='종목별 룰';

--
-- Table structure for table `charge_event`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `charge_event` (
  `level` int(11) unsigned NOT NULL COMMENT '레벨 (1 ~ 10)',
  `bonus` int(11) unsigned NOT NULL DEFAULT 1000000 COMMENT '보너스(%)',
  `max_bonus` int(11) NOT NULL DEFAULT 0,
  `pay_back_value` int(11) DEFAULT NULL,
  PRIMARY KEY (`level`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='돌발충전 이벤트';

--
-- Table structure for table `charge_type`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `charge_type` (
  `level` int(11) NOT NULL,
  `charge_type` int(11) NOT NULL COMMENT '0-캐쉬, 1-코인, 2-가상계좌',
  `name` varchar(45) DEFAULT NULL,
  `bonus_1_charge_first_money` int(11) DEFAULT 0,
  `bonus_1_charge_first_per` int(11) DEFAULT 0,
  `bonus_1_charge_first_max_money` int(11) DEFAULT 0,
  `bonus_1_charge_money` int(11) DEFAULT 0,
  `bonus_1_charge_per` int(11) DEFAULT 0,
  `bonus_1_charge_max_money` int(11) DEFAULT 0,
  `bonus_2_charge_first_money` int(11) DEFAULT 0,
  `bonus_2_charge_first_per` int(11) DEFAULT 0,
  `bonus_2_charge_first_max_money` int(11) DEFAULT 0,
  `bonus_2_charge_money` int(11) DEFAULT 0,
  `bonus_2_charge_max_money` int(11) DEFAULT 0,
  `bonus_2_charge_per` int(11) DEFAULT 0,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='레벨별 충전방식';

--
-- Temporary view structure for view `day_bet_mini`
--

/*!50001 DROP VIEW IF EXISTS `day_bet_mini`*/;
/*!50001 CREATE VIEW `day_bet_mini` AS SELECT 
 1 AS `stype`,
 1 AS `s_money`*/;

--
-- Temporary view structure for view `day_bet_pre`
--

/*!50001 DROP VIEW IF EXISTS `day_bet_pre`*/;
/*!50001 CREATE VIEW `day_bet_pre` AS SELECT 
 1 AS `stype`,
 1 AS `status`,
 1 AS `cnt`,
 1 AS `s_money`,
 1 AS `s_win_money`*/;

--
-- Temporary view structure for view `day_bet_real`
--

/*!50001 DROP VIEW IF EXISTS `day_bet_real`*/;
/*!50001 CREATE VIEW `day_bet_real` AS SELECT 
 1 AS `stype`,
 1 AS `status`,
 1 AS `cnt`,
 1 AS `s_money`,
 1 AS `s_win_money`*/;

--
-- Temporary view structure for view `day_casino_slot_view`
--

/*!50001 DROP VIEW IF EXISTS `day_casino_slot_view`*/;
/*!50001 CREATE VIEW `day_casino_slot_view` AS SELECT 
 1 AS `stype`,
 1 AS `total_bet_money`,
 1 AS `total_win_money`,
 1 AS `total_ing_bet_money`*/;

--
-- Temporary view structure for view `day_ch_ex`
--

/*!50001 DROP VIEW IF EXISTS `day_ch_ex`*/;
/*!50001 CREATE VIEW `day_ch_ex` AS SELECT 
 1 AS `stype`,
 1 AS `status`,
 1 AS `cnt`,
 1 AS `s_money`*/;

--
-- Temporary view structure for view `day_espt_hash_view`
--

/*!50001 DROP VIEW IF EXISTS `day_espt_hash_view`*/;
/*!50001 CREATE VIEW `day_espt_hash_view` AS SELECT 
 1 AS `stype`,
 1 AS `total_bet_money`,
 1 AS `total_win_money`,
 1 AS `total_ing_bet_money`*/;

--
-- Temporary view structure for view `day_now_call_check`
--

/*!50001 DROP VIEW IF EXISTS `day_now_call_check`*/;
/*!50001 CREATE VIEW `day_now_call_check` AS SELECT 
 1 AS `stype`,
 1 AS `status`,
 1 AS `cnt`,
 1 AS `s_money`*/;

--
-- Table structure for table `dist_type`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `dist_type` (
  `id` int(11) NOT NULL DEFAULT 0,
  `name` varchar(45) DEFAULT '',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='Distributor type definition table';

--
-- Table structure for table `dividend_policy`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `dividend_policy` (
  `rank` int(11) unsigned NOT NULL COMMENT '등급 (1 ~ N)',
  `type` tinyint(1) unsigned NOT NULL COMMENT '타입 (1: 프리매치, 2: 실시간)',
  `level` int(11) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 1000000 COMMENT '등급별 배당 금액',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp() COMMENT '생성일',
  `update_dt` datetime DEFAULT NULL COMMENT '수정일',
  PRIMARY KEY (`rank`,`type`,`level`) USING BTREE,
  KEY `idx_rank` (`rank`),
  KEY `idx_bet_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배당 금액 정책 테이블';

--
-- Table structure for table `dividend_policy_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `dividend_policy_backup` (
  `rank` int(11) unsigned NOT NULL COMMENT '등급 (1 ~ N)',
  `type` tinyint(1) unsigned NOT NULL COMMENT '타입 (1: 프리매치, 2: 실시간)',
  `level` int(11) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 1000000 COMMENT '등급별 배당 금액',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp() COMMENT '생성일',
  `update_dt` datetime DEFAULT NULL COMMENT '수정일'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `dividend_policy_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `dividend_policy_innodb` (
  `rank` int(11) unsigned NOT NULL COMMENT '등급 (1 ~ N)',
  `type` tinyint(1) unsigned NOT NULL COMMENT '타입 (1: 프리매치, 2: 실시간)',
  `level` int(11) NOT NULL,
  `amount` int(11) unsigned NOT NULL DEFAULT 1000000 COMMENT '등급별 배당 금액',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp() COMMENT '생성일',
  `update_dt` datetime DEFAULT NULL COMMENT '수정일',
  PRIMARY KEY (`rank`,`type`,`level`),
  KEY `idx_rank` (`rank`),
  KEY `idx_bet_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배당 금액 정책 테이블';

--
-- Table structure for table `events`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `events` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT '',
  `thumbnail` varchar(1024) DEFAULT '',
  `detail` text DEFAULT '',
  `status` tinyint(4) DEFAULT 1 COMMENT '0-미사용, 1-사용',
  `del_flag` tinyint(4) DEFAULT 0 COMMENT '0-존재, 1-삭제됨',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  KEY `thumbnail` (`thumbnail`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `fixtures_bet_sum`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `fixtures_bet_sum` (
  `member_idx` int(11) NOT NULL,
  `fixture_id` int(11) NOT NULL DEFAULT 0,
  `bet_type` int(11) NOT NULL DEFAULT 0 COMMENT '1 : 스포츠 2 : 실시간 ',
  `sum_bet_money` bigint(20) DEFAULT 0,
  PRIMARY KEY (`fixture_id`,`bet_type`,`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='유저들의 경기별 배팅금액을 누적관리하는 테이블이다 스포츠,실시간 각각 관리된다.';

--
-- Table structure for table `fixtures_bet_sum_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `fixtures_bet_sum_backup` (
  `member_idx` int(11) NOT NULL,
  `fixture_id` int(11) NOT NULL DEFAULT 0,
  `bet_type` int(11) NOT NULL DEFAULT 0 COMMENT '1 : 스포츠 2 : 실시간 ',
  `sum_bet_money` bigint(20) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `fixtures_bet_sum_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `fixtures_bet_sum_innodb` (
  `member_idx` int(11) NOT NULL,
  `fixture_id` int(11) NOT NULL DEFAULT 0,
  `bet_type` int(11) NOT NULL DEFAULT 0 COMMENT '1 : 스포츠 2 : 실시간 ',
  `sum_bet_money` bigint(20) DEFAULT 0,
  PRIMARY KEY (`fixture_id`,`bet_type`,`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='유저들의 경기별 배팅금액을 누적관리하는 테이블이다 스포츠,실시간 각각 관리된다.';

--
-- Table structure for table `help`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `help` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `member_idx` int(11) DEFAULT NULL,
  `admin_idx` int(11) DEFAULT NULL,
  `title` varchar(45) DEFAULT NULL,
  `contents` varchar(45) DEFAULT NULL,
  `status` varchar(45) DEFAULT '대기' COMMENT '‘대기’, ‘완료’',
  `is_delete` varchar(45) DEFAULT NULL,
  `create_datetime` datetime DEFAULT NULL,
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `inspection`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `inspection` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(45) DEFAULT '',
  `contents` varchar(1024) DEFAULT '',
  `start_dt` datetime DEFAULT current_timestamp(),
  `end_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='점검메세지';

--
-- Table structure for table `item`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `item` (
  `id` int(11) NOT NULL DEFAULT 0 COMMENT '고유 아이디',
  `name` varchar(45) DEFAULT NULL COMMENT '아이템 이름',
  `desc` varchar(256) DEFAULT NULL COMMENT '상세설명',
  `type` tinyint(2) DEFAULT 0 COMMENT '1: 환급, 2: 배당up,3:적특 ',
  `value` decimal(6,2) DEFAULT NULL,
  `is_open` varchar(2) DEFAULT 'Y' COMMENT '프론트에 노출여부  Y => 노출 , N => 미노출 ',
  `buy_type` tinyint(2) DEFAULT 0 COMMENT '0 : g_point , 1 : 포인트 2 : 머니,3 : 무료',
  `price` int(11) DEFAULT 0,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='아이템 관리 테이블';

--
-- Table structure for table `join_message`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `join_message` (
  `a_id` varchar(45) NOT NULL COMMENT '작성자',
  `title` varchar(100) DEFAULT NULL,
  `contents` text DEFAULT NULL,
  `update_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`a_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='가입메세지';

--
-- Table structure for table `lsports_bet`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_bet` (
  `bet_id` bigint(20) unsigned NOT NULL COMMENT '배팅 아이디',
  `fixture_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'lsports_fixtures.fixture_id 참조 ',
  `bet_type` int(11) NOT NULL COMMENT '0:기타, 1:스포츠, 2:실시간',
  `markets_id` int(11) NOT NULL DEFAULT 0 COMMENT 'lsports_markets.id ',
  `providers_id` int(11) DEFAULT NULL COMMENT '공급자 아이디. 공급자는 해당 배팅 정보를 불러오는 원본 정보 제공 업체이다. (대포적으로 bet365)',
  `bet_name` varchar(45) DEFAULT NULL COMMENT '배팅 이름, market_id comment 에 없는 목록은 하지 않는다.  [1:승,첫득점팀 X:무 2:패,첫득점팀, No Goal:첫득점팀 Over:오버 Under: 언더 12:더블찬스 승패 X1:더블찬스 승무 X2:더블찬스 무패 No:양팀득점실패 Yes:양팀득점성공 X/X,1/X,2/X:전반전 및 풀타임 Even:홀 Odd:짝 0-0,1-0,0-1…: 정확한스코어]',
  `bet_status` tinyint(2) NOT NULL DEFAULT 1 COMMENT '배팅 상태 [1:open(배팅가능) 2:Suspended(배팅중단) 3:Settled(결과완료)]',
  `bet_line` varchar(45) DEFAULT NULL COMMENT 'Line (마켓이 핸디캡/언더오버인 경우  해당값으로 정산 결과를 반영, front view 에서도 일부 값을 표현하는데 사용)',
  `bet_base_line` varchar(45) DEFAULT NULL COMMENT 'base_Line (마켓이 핸디캡/언더오버인 경우  해당값으로 정산 결과를 반영, front view 에서도 일부 값을 표현하는데 사용)',
  `bet_settlement` int(11) DEFAULT NULL,
  `bet_price` decimal(7,2) DEFAULT NULL COMMENT '현재 배팅 값 ',
  `admin_bet_status` enum('ON','OFF') DEFAULT 'ON' COMMENT 'ON, OFF',
  `create_dt` datetime DEFAULT current_timestamp() COMMENT 'KST ',
  `update_dt` datetime DEFAULT current_timestamp() COMMENT 'KST',
  `result_p1` int(11) DEFAULT NULL,
  `result_p2` int(11) DEFAULT NULL,
  `result_2_p1` int(11) DEFAULT NULL,
  `result_2_p2` int(11) DEFAULT NULL,
  `bet_price_hit` decimal(7,2) DEFAULT 0.00,
  `passivity_flag` enum('ON','OFF') DEFAULT 'OFF',
  `bet_status_passivity` tinyint(2) DEFAULT NULL,
  `bet_price_passivity` decimal(7,2) DEFAULT NULL,
  `last_update` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`bet_id`,`bet_type`),
  KEY `idx_fix_id` (`fixture_id`),
  KEY `idx_mk_id` (`markets_id`),
  KEY `idx_fix_bt_am` (`fixture_id`,`bet_type`),
  KEY `idx_bt` (`bet_type`,`admin_bet_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_bet_InnoDB`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_bet_InnoDB` (
  `bet_id` bigint(20) unsigned NOT NULL COMMENT '배팅 아이디',
  `fixture_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'lsports_fixtures.fixture_id 참조 ',
  `bet_type` int(11) NOT NULL COMMENT '0:기타, 1:스포츠, 2:실시간',
  `markets_id` int(11) NOT NULL DEFAULT 0 COMMENT 'lsports_markets.id ',
  `providers_id` int(11) DEFAULT NULL COMMENT '공급자 아이디. 공급자는 해당 배팅 정보를 불러오는 원본 정보 제공 업체이다. (대포적으로 bet365)',
  `bet_name` varchar(45) DEFAULT NULL COMMENT '배팅 이름, market_id comment 에 없는 목록은 하지 않는다.  [1:승,첫득점팀 X:무 2:패,첫득점팀, No Goal:첫득점팀 Over:오버 Under: 언더 12:더블찬스 승패 X1:더블찬스 승무 X2:더블찬스 무패 No:양팀득점실패 Yes:양팀득점성공 X/X,1/X,2/X:전반전 및 풀타임 Even:홀 Odd:짝 0-0,1-0,0-1…: 정확한스코어]',
  `bet_status` tinyint(2) NOT NULL DEFAULT 1 COMMENT '배팅 상태 [1:open(배팅가능) 2:Suspended(배팅중단) 3:Settled(결과완료)]',
  `bet_line` varchar(45) DEFAULT NULL COMMENT 'Line (마켓이 핸디캡/언더오버인 경우  해당값으로 정산 결과를 반영, front view 에서도 일부 값을 표현하는데 사용)',
  `bet_base_line` varchar(45) DEFAULT NULL COMMENT 'base_Line (마켓이 핸디캡/언더오버인 경우  해당값으로 정산 결과를 반영, front view 에서도 일부 값을 표현하는데 사용)',
  `bet_settlement` int(11) DEFAULT NULL,
  `bet_price` decimal(7,2) DEFAULT NULL COMMENT '현재 배팅 값 ',
  `admin_bet_status` enum('ON','OFF') DEFAULT 'ON' COMMENT 'ON, OFF',
  `create_dt` datetime DEFAULT current_timestamp() COMMENT 'KST ',
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'KST',
  `result_p1` int(11) DEFAULT NULL,
  `result_p2` int(11) DEFAULT NULL,
  `result_2_p1` int(11) DEFAULT NULL,
  `result_2_p2` int(11) DEFAULT NULL,
  `bet_price_hit` decimal(7,2) DEFAULT 0.00,
  `passivity_flag` enum('ON','OFF') DEFAULT 'OFF',
  `bet_status_passivity` tinyint(2) DEFAULT NULL,
  `bet_price_passivity` decimal(7,2) DEFAULT NULL,
  PRIMARY KEY (`bet_id`,`bet_type`),
  KEY `idx_fix` (`fixture_id`),
  KEY `idx_mk_id` (`markets_id`),
  KEY `idx_sports` (`bet_type`,`bet_status`,`admin_bet_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_bet_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_bet_backup` (
  `bet_id` bigint(20) unsigned NOT NULL COMMENT '배팅 아이디',
  `fixture_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'lsports_fixtures.fixture_id 참조 ',
  `bet_type` int(11) NOT NULL COMMENT '0:기타, 1:스포츠, 2:실시간',
  `markets_id` int(11) NOT NULL DEFAULT 0 COMMENT 'lsports_markets.id ',
  `providers_id` int(11) DEFAULT NULL COMMENT '공급자 아이디. 공급자는 해당 배팅 정보를 불러오는 원본 정보 제공 업체이다. (대포적으로 bet365)',
  `bet_name` varchar(45) DEFAULT NULL COMMENT '배팅 이름, market_id comment 에 없는 목록은 하지 않는다.  [1:승,첫득점팀 X:무 2:패,첫득점팀, No Goal:첫득점팀 Over:오버 Under: 언더 12:더블찬스 승패 X1:더블찬스 승무 X2:더블찬스 무패 No:양팀득점실패 Yes:양팀득점성공 X/X,1/X,2/X:전반전 및 풀타임 Even:홀 Odd:짝 0-0,1-0,0-1…: 정확한스코어]',
  `bet_status` tinyint(2) NOT NULL DEFAULT 1 COMMENT '배팅 상태 [1:open(배팅가능) 2:Suspended(배팅중단) 3:Settled(결과완료)]',
  `bet_line` varchar(45) DEFAULT NULL COMMENT 'Line (마켓이 핸디캡/언더오버인 경우  해당값으로 정산 결과를 반영, front view 에서도 일부 값을 표현하는데 사용)',
  `bet_base_line` varchar(45) DEFAULT NULL COMMENT 'base_Line (마켓이 핸디캡/언더오버인 경우  해당값으로 정산 결과를 반영, front view 에서도 일부 값을 표현하는데 사용)',
  `bet_settlement` int(11) DEFAULT NULL,
  `bet_price` decimal(7,2) DEFAULT NULL COMMENT '현재 배팅 값 ',
  `admin_bet_status` enum('ON','OFF') DEFAULT 'ON' COMMENT 'ON, OFF',
  `create_dt` datetime DEFAULT current_timestamp() COMMENT 'KST ',
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'KST',
  `result_p1` int(11) DEFAULT NULL,
  `result_p2` int(11) DEFAULT NULL,
  `result_2_p1` int(11) DEFAULT NULL,
  `result_2_p2` int(11) DEFAULT NULL,
  `bet_price_hit` decimal(7,2) DEFAULT 0.00,
  `passivity_flag` enum('ON','OFF') DEFAULT 'OFF',
  `bet_status_passivity` tinyint(2) DEFAULT NULL,
  `bet_price_passivity` decimal(7,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_bookmaker`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_bookmaker` (
  `id` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `is_use` tinyint(4) DEFAULT 0,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_is_use` (`is_use`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_fixtures`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_fixtures` (
  `fixture_id` int(11) NOT NULL COMMENT 'lsports api 에서 조회한 fixtures_id 값 ',
  `bet_type` int(11) NOT NULL DEFAULT 0 COMMENT '0:기타, 1:스포츠, 2:실시간',
  `fixture_sport_id` int(11) NOT NULL COMMENT 'lsports_sports 테이블 참조 ',
  `fixture_location_id` int(11) NOT NULL COMMENT 'lsports_location 테이블 참조 ',
  `fixture_league_id` int(11) NOT NULL COMMENT 'lsports_league 테이블 참조 ',
  `fixture_start_date` datetime NOT NULL COMMENT '경기 시작 시간  _ KST 기준 ',
  `fixture_status` varchar(2) NOT NULL COMMENT '현재 경기 상태 \n1	Not started yet	\n2	In progress	    \n3	Finished	    \n4	Cancelled	    \n5	Postponed	    \n6	Interrupted	    \n7	Abandoned	    \n8	Coverage lost	\n9	About to start	',
  `fixture_participants_1_id` int(11) DEFAULT NULL,
  `fixture_participants_2_id` int(11) DEFAULT NULL,
  `livescore` mediumtext DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp() COMMENT 'KST',
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'KST',
  `live_results_p1` int(11) DEFAULT NULL,
  `live_results_p2` int(11) DEFAULT NULL,
  `m_live_results_p1` int(11) DEFAULT NULL,
  `m_live_results_p2` int(11) DEFAULT NULL,
  `admin_bet_status` enum('ON','OFF','RETRY') DEFAULT 'ON',
  `display_status` tinyint(2) DEFAULT 1 COMMENT '1. 베팅가능=> status 1,9 => 픽스처정보에서 배팅가능은 경기시간에서 -1440분을 뺀 시간부터 -1분까지의 경기\\n2. 베팅마감 =>status 2,5,6,7,8  => 경기시간에서 59초를 뺀 경기\\n3. 종료 => status 3,4  =>  결과처리된 경기 또는 4,5,6,7이 들어올시 (경기상세정보에서 적특표기색상으로 해주세요 노란색)\\n',
  `break_dt` datetime DEFAULT NULL,
  `passivity_flag` enum('ON','OFF') DEFAULT 'OFF',
  `fixture_start_date_passivity` datetime DEFAULT NULL,
  `display_status_passivity` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`fixture_id`,`bet_type`),
  KEY `idx_std` (`fixture_start_date`),
  KEY `idx_fix_id` (`fixture_id`),
  KEY `idx_bet_type` (`bet_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_fixtures_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_fixtures_backup` (
  `fixture_id` int(11) NOT NULL COMMENT 'lsports api 에서 조회한 fixtures_id 값 ',
  `bet_type` int(11) NOT NULL DEFAULT 0 COMMENT '0:기타, 1:스포츠, 2:실시간',
  `fixture_sport_id` int(11) NOT NULL COMMENT 'lsports_sports 테이블 참조 ',
  `fixture_location_id` int(11) NOT NULL COMMENT 'lsports_location 테이블 참조 ',
  `fixture_league_id` int(11) NOT NULL COMMENT 'lsports_league 테이블 참조 ',
  `fixture_start_date` datetime NOT NULL COMMENT '경기 시작 시간  _ KST 기준 ',
  `fixture_status` varchar(2) NOT NULL COMMENT '현재 경기 상태 \n1	Not started yet	\n2	In progress	    \n3	Finished	    \n4	Cancelled	    \n5	Postponed	    \n6	Interrupted	    \n7	Abandoned	    \n8	Coverage lost	\n9	About to start	',
  `fixture_participants_1_id` int(11) DEFAULT NULL,
  `fixture_participants_2_id` int(11) DEFAULT NULL,
  `livescore` varchar(16384) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp() COMMENT 'KST',
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'KST',
  `live_results_p1` int(11) DEFAULT NULL,
  `live_results_p2` int(11) DEFAULT NULL,
  `m_live_results_p1` int(11) DEFAULT NULL,
  `m_live_results_p2` int(11) DEFAULT NULL,
  `admin_bet_status` enum('ON','OFF','RETRY') DEFAULT 'ON',
  `display_status` tinyint(2) DEFAULT 1 COMMENT '1. 베팅가능=> status 1,9 => 픽스처정보에서 배팅가능은 경기시간에서 -1440분을 뺀 시간부터 -1분까지의 경기\\n2. 베팅마감 =>status 2,5,6,7,8  => 경기시간에서 59초를 뺀 경기\\n3. 종료 => status 3,4  =>  결과처리된 경기 또는 4,5,6,7이 들어올시 (경기상세정보에서 적특표기색상으로 해주세요 노란색)\\n',
  `break_dt` datetime DEFAULT NULL,
  `passivity_flag` enum('ON','OFF') DEFAULT 'OFF',
  `fixture_start_date_passivity` datetime DEFAULT NULL,
  `display_status_passivity` tinyint(2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_fixtures_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_fixtures_innodb` (
  `fixture_id` int(11) NOT NULL COMMENT 'lsports api 에서 조회한 fixtures_id 값 ',
  `bet_type` int(11) NOT NULL DEFAULT 0 COMMENT '0:기타, 1:스포츠, 2:실시간',
  `fixture_sport_id` int(11) NOT NULL COMMENT 'lsports_sports 테이블 참조 ',
  `fixture_location_id` int(11) NOT NULL COMMENT 'lsports_location 테이블 참조 ',
  `fixture_league_id` int(11) NOT NULL COMMENT 'lsports_league 테이블 참조 ',
  `fixture_start_date` datetime NOT NULL COMMENT '경기 시작 시간  _ KST 기준 ',
  `fixture_status` varchar(2) NOT NULL COMMENT '현재 경기 상태 \n1	Not started yet	\n2	In progress	    \n3	Finished	    \n4	Cancelled	    \n5	Postponed	    \n6	Interrupted	    \n7	Abandoned	    \n8	Coverage lost	\n9	About to start	',
  `fixture_participants_1_id` int(11) DEFAULT NULL,
  `fixture_participants_2_id` int(11) DEFAULT NULL,
  `livescore` varchar(16384) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp() COMMENT 'KST',
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'KST',
  `live_results_p1` int(11) DEFAULT NULL,
  `live_results_p2` int(11) DEFAULT NULL,
  `m_live_results_p1` int(11) DEFAULT NULL,
  `m_live_results_p2` int(11) DEFAULT NULL,
  `admin_bet_status` enum('ON','OFF','RETRY') DEFAULT 'ON',
  `display_status` int(11) DEFAULT 1 COMMENT '1. 베팅가능=> status 1,9 => 픽스처정보에서 배팅가능은 경기시간에서 -1440분을 뺀 시간부터 -1분까지의 경기\n2. 베팅마감 =>status 2,5,6,7,8  => 경기시간에서 59초를 뺀 경기\n3. 종료 => status 3,4  =>  결과처리된 경기 또는 4,5,6,7이 들어올시 (경기상세정보에서 적특표기색상으로 해주세요 노란색)\n',
  `break_dt` datetime DEFAULT NULL,
  PRIMARY KEY (`fixture_id`,`bet_type`),
  KEY `idx_std` (`fixture_start_date`),
  KEY `idx_fix_id` (`fixture_id`),
  KEY `idx_bet_type` (`bet_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_game_type`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_game_type` (
  `id` int(11) NOT NULL DEFAULT 0,
  `name` varchar(20) NOT NULL DEFAULT '',
  `ko_name` varchar(20) DEFAULT NULL,
  `status` enum('ON','OFF') NOT NULL DEFAULT 'ON',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_leagues`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_leagues` (
  `id` int(11) NOT NULL DEFAULT 0,
  `bet_type` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자에게 보여지는 이름 ',
  `location_id` int(11) DEFAULT NULL,
  `sport_id` int(11) DEFAULT NULL,
  `season` varchar(45) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_use` tinyint(4) DEFAULT 2 COMMENT '리그 사용 여부 0 : 미사용 1 : 사용 2 : 대기 ',
  `deduction_refund_rate` decimal(5,2) DEFAULT 0.00,
  `is_margin_refund` int(11) DEFAULT 0,
  `dividend_rank` int(10) unsigned NOT NULL DEFAULT 1 COMMENT '배당금액 등급',
  `my_league` int(11) DEFAULT 0,
  `quarter_time` int(11) DEFAULT NULL,
  `image_path` varchar(200) DEFAULT '',
  `input_refund_rate` decimal(5,2) DEFAULT 0.00,
  PRIMARY KEY (`id`,`bet_type`),
  KEY `id` (`id`),
  KEY `ch_idx` (`id`,`location_id`,`sport_id`,`is_use`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_leagues_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_leagues_backup` (
  `id` int(11) NOT NULL DEFAULT 0,
  `bet_type` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자에게 보여지는 이름 ',
  `location_id` int(11) DEFAULT NULL,
  `sport_id` int(11) DEFAULT NULL,
  `season` varchar(45) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_use` tinyint(4) DEFAULT 2 COMMENT '리그 사용 여부 0 : 미사용 1 : 사용 2 : 대기 ',
  `deduction_refund_rate` decimal(5,2) DEFAULT 0.00,
  `is_margin_refund` int(11) DEFAULT 0,
  `dividend_rank` int(10) unsigned NOT NULL DEFAULT 1 COMMENT '배당금액 등급',
  `my_league` int(11) DEFAULT 0,
  `quarter_time` int(11) DEFAULT NULL,
  `image_path` varchar(200) DEFAULT '',
  `input_refund_rate` decimal(5,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_leagues_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_leagues_innodb` (
  `id` int(11) NOT NULL DEFAULT 0,
  `bet_type` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자에게 보여지는 이름 ',
  `location_id` int(11) DEFAULT NULL,
  `sport_id` int(11) DEFAULT NULL,
  `season` varchar(45) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_use` tinyint(4) DEFAULT 2 COMMENT '리그 사용 여부 0 : 미사용 1 : 사용 2 : 대기 ',
  `deduction_refund_rate` decimal(5,2) DEFAULT 0.00,
  `is_margin_refund` int(11) DEFAULT 0,
  `dividend_rank` int(10) unsigned NOT NULL DEFAULT 1 COMMENT '배당금액 등급',
  `my_league` int(11) DEFAULT 0,
  `quarter_time` int(11) DEFAULT NULL,
  `image_path` varchar(200) DEFAULT '',
  `input_refund_rate` decimal(5,2) DEFAULT 0.00,
  PRIMARY KEY (`id`,`bet_type`),
  KEY `idx_sp_id` (`sport_id`),
  KEY `id` (`id`),
  KEY `ch_idx` (`id`,`location_id`,`sport_id`,`is_use`),
  KEY `idx_use` (`is_use`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_locations`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_locations` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `name_en` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자에게 보여지는 이름 ',
  `lang` varchar(45) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_use` tinyint(4) DEFAULT 1 COMMENT '지역 사용 여부 ',
  `image_path` varchar(200) DEFAULT NULL COMMENT '지역 이미지 ',
  PRIMARY KEY (`idx`),
  KEY `id_index` (`id`),
  KEY `idx_name` (`name`),
  KEY `idx_isuse` (`is_use`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=256 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_locations_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_locations_backup` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `name_en` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자에게 보여지는 이름 ',
  `lang` varchar(45) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_use` tinyint(4) DEFAULT 1 COMMENT '지역 사용 여부 ',
  `image_path` varchar(200) DEFAULT NULL COMMENT '지역 이미지 '
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_locations_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_locations_innodb` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `name_en` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자에게 보여지는 이름 ',
  `lang` varchar(45) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_use` tinyint(4) DEFAULT 1 COMMENT '지역 사용 여부 ',
  `image_path` varchar(200) DEFAULT NULL COMMENT '지역 이미지 ',
  PRIMARY KEY (`idx`),
  KEY `id_index` (`id`),
  KEY `idx_name` (`name`),
  KEY `idx_isuse` (`is_use`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=511 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_magin_range`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_magin_range` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `type` int(11) DEFAULT 0,
  `min` decimal(5,2) NOT NULL DEFAULT 0.00,
  `max` decimal(5,2) NOT NULL DEFAULT 0.00,
  `value` decimal(5,2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_markets`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_markets` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) DEFAULT NULL,
  `bet_group` tinyint(3) unsigned DEFAULT 0 COMMENT '0:기타, 1:스포츠, 2:실시간',
  `sport_id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_delete` tinyint(4) DEFAULT 0 COMMENT '1: 삭제 ',
  `main_book_maker` int(11) DEFAULT NULL,
  `sub_book_maker` int(11) DEFAULT NULL,
  `menu` int(11) DEFAULT NULL COMMENT '1: 메인 2 : 오버언더 : 3: 핸디캡 4: 그외 5:쿼터 6: 하프 ',
  `limit_bet_price` decimal(7,2) DEFAULT 0.00,
  `max_bet_price` decimal(7,2) DEFAULT 0.00,
  `not_display_period` int(11) DEFAULT 0 COMMENT '해당 피어리어드 부터 안보이게 처리 not_display_time 컬럼의 시간값 사용 ',
  `not_display_time` int(11) DEFAULT 0 COMMENT 'not_display_period 의값을 기준으로 해당 퍼리어드에서 몇분지났을때 시간 ',
  `not_display_score` int(11) DEFAULT 0 COMMENT '해당 점수로 안보이게 처리 not_display_score_team_type 컬럼의 데이터에 따라 홈,원정,구분없음으로 처리를 한다.',
  `not_display_score_team_type` int(11) DEFAULT 0 COMMENT '0 :  none 1 :  홈팀 2: 원정 3: 구분없음 ',
  `display_order` int(11) DEFAULT 0 COMMENT '프론트 정렬 순서',
  `is_main_menu` tinyint(4) DEFAULT 0 COMMENT '해당 마켓이 메인메뉴에 노출되는지 여부 0 : 비노출 1: 노출 ',
  `main_display_order` int(11) DEFAULT 0,
  PRIMARY KEY (`idx`),
  KEY `id_index` (`id`),
  KEY `g_d_index` (`id`,`bet_group`,`is_delete`,`name`,`sport_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2949 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_markets_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_markets_backup` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `id` int(11) DEFAULT NULL,
  `bet_group` tinyint(3) unsigned DEFAULT 0 COMMENT '0:기타, 1:스포츠, 2:실시간',
  `sport_id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_delete` tinyint(4) DEFAULT 0 COMMENT '1: 삭제 ',
  `main_book_maker` int(11) DEFAULT NULL,
  `sub_book_maker` int(11) DEFAULT NULL,
  `menu` int(11) DEFAULT NULL COMMENT '1: 메인 2 : 오버언더 : 3: 핸디캡 4: 그외 5:쿼터 6: 하프 ',
  `limit_bet_price` decimal(7,2) DEFAULT 0.00,
  `max_bet_price` decimal(7,2) DEFAULT 0.00,
  `not_display_period` int(11) DEFAULT 0 COMMENT '해당 피어리어드 부터 안보이게 처리 not_display_time 컬럼의 시간값 사용 ',
  `not_display_time` int(11) DEFAULT 0 COMMENT 'not_display_period 의값을 기준으로 해당 퍼리어드에서 몇분지났을때 시간 ',
  `not_display_score` int(11) DEFAULT 0 COMMENT '해당 점수로 안보이게 처리 not_display_score_team_type 컬럼의 데이터에 따라 홈,원정,구분없음으로 처리를 한다.',
  `not_display_score_team_type` int(11) DEFAULT 0 COMMENT '0 :  none 1 :  홈팀 2: 원정 3: 구분없음 ',
  `display_order` int(11) DEFAULT 0 COMMENT '프론트 정렬 순서',
  `is_main_menu` tinyint(4) DEFAULT 0 COMMENT '해당 마켓이 메인메뉴에 노출되는지 여부 0 : 비노출 1: 노출 ',
  `main_display_order` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_markets_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_markets_innodb` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) DEFAULT NULL,
  `bet_group` tinyint(3) unsigned DEFAULT 0 COMMENT '0:기타, 1:스포츠, 2:실시간',
  `sport_id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `is_delete` tinyint(4) DEFAULT 0 COMMENT '1: 삭제 ',
  `main_book_maker` int(11) DEFAULT NULL,
  `sub_book_maker` int(11) DEFAULT NULL,
  `menu` int(11) DEFAULT NULL COMMENT '1: 메인 2 : 오버언더 : 3: 핸디캡 4: 그외 5:쿼터 6: 하프 ',
  `limit_bet_price` decimal(7,2) DEFAULT 0.00,
  `max_bet_price` decimal(7,2) DEFAULT 0.00,
  `not_display_period` int(11) DEFAULT 0 COMMENT '해당 피어리어드 부터 안보이게 처리 not_display_time 컬럼의 시간값 사용 ',
  `not_display_time` int(11) DEFAULT 0 COMMENT 'not_display_period 의값을 기준으로 해당 퍼리어드에서 몇분지났을때 시간 ',
  `not_display_score` int(11) DEFAULT 0 COMMENT '해당 점수로 안보이게 처리 not_display_score_team_type 컬럼의 데이터에 따라 홈,원정,구분없음으로 처리를 한다.',
  `not_display_score_team_type` int(11) DEFAULT 0 COMMENT '0 :  none 1 :  홈팀 2: 원정 3: 구분없음 ',
  `display_order` int(11) DEFAULT 0 COMMENT '프론트 정렬 순서',
  `is_main_menu` tinyint(4) DEFAULT 0 COMMENT '해당 마켓이 메인메뉴에 노출되는지 여부 0 : 비노출 1: 노출 ',
  `main_display_order` int(11) DEFAULT 0,
  PRIMARY KEY (`idx`),
  KEY `id_index` (`id`),
  KEY `g_d_index` (`id`,`bet_group`,`is_delete`,`name`,`sport_id`),
  KEY `idx_g_d` (`bet_group`,`is_delete`,`sport_id`,`main_book_maker`)
) ENGINE=InnoDB AUTO_INCREMENT=3385 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_participant`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_participant` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `fp_id` int(11) NOT NULL COMMENT 'lsports_fixtures. fixture_participants_1(2)_id 와 매칭되는 값 ',
  `sports_id` int(11) DEFAULT NULL COMMENT 'lsports_sports.id',
  `location_id` int(11) DEFAULT NULL COMMENT 'lsports_locations.id',
  `league_id` int(11) DEFAULT NULL COMMENT 'lsports_leagues.id',
  `team_name` varchar(100) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자들에게 보여지는 값 ',
  `is_new` tinyint(4) DEFAULT 1,
  PRIMARY KEY (`idx`,`fp_id`),
  UNIQUE KEY `fp_id_UNIQUE` (`fp_id`)
) ENGINE=InnoDB AUTO_INCREMENT=343267689 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_participant_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_participant_backup` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `fp_id` int(11) NOT NULL COMMENT 'lsports_fixtures. fixture_participants_1(2)_id 와 매칭되는 값 ',
  `sports_id` int(11) DEFAULT NULL COMMENT 'lsports_sports.id',
  `location_id` int(11) DEFAULT NULL COMMENT 'lsports_locations.id',
  `league_id` int(11) DEFAULT NULL COMMENT 'lsports_leagues.id',
  `team_name` varchar(100) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자들에게 보여지는 값 ',
  `is_new` tinyint(4) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_participant_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_participant_innodb` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `fp_id` int(11) NOT NULL COMMENT 'lsports_fixtures. fixture_participants_1(2)_id 와 매칭되는 값 ',
  `sports_id` int(11) DEFAULT NULL COMMENT 'lsports_sports.id',
  `location_id` int(11) DEFAULT NULL COMMENT 'lsports_locations.id',
  `league_id` int(11) DEFAULT NULL COMMENT 'lsports_leagues.id',
  `team_name` varchar(100) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL COMMENT '사용자들에게 보여지는 값 ',
  `is_new` tinyint(4) DEFAULT 1,
  PRIMARY KEY (`idx`,`fp_id`),
  UNIQUE KEY `fp_id_UNIQUE` (`fp_id`),
  KEY `idx_is_new` (`is_new`)
) ENGINE=InnoDB AUTO_INCREMENT=335698430 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_refund_rate_market`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_refund_rate_market` (
  `sports_id` int(11) NOT NULL,
  `league_id` int(11) NOT NULL,
  `market_id` int(11) NOT NULL,
  `bet_type` int(11) NOT NULL,
  `refund_rate` decimal(5,2) DEFAULT 0.00,
  `deduction_refund_rate` decimal(5,2) DEFAULT 0.00,
  `is_margin_refund` int(11) DEFAULT 0,
  PRIMARY KEY (`market_id`,`sports_id`,`league_id`,`bet_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_sports`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_sports` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL,
  `bet_type` int(11) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` varchar(45) DEFAULT NULL,
  `is_delete` tinyint(4) DEFAULT 0,
  `is_use` tinyint(4) DEFAULT 1,
  `image_path` varchar(90) DEFAULT '',
  `input_refund_rate` decimal(5,2) DEFAULT 0.00,
  `display_order` int(11) DEFAULT 0,
  `deduction_refund_rate` decimal(5,2) DEFAULT 0.00,
  `is_margin_refund` int(11) DEFAULT 0,
  PRIMARY KEY (`idx`),
  KEY `id_idx` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=178 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_sports_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_sports_backup` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL,
  `bet_type` int(11) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` varchar(45) DEFAULT NULL,
  `is_delete` tinyint(4) DEFAULT 0,
  `is_use` tinyint(4) DEFAULT 1,
  `image_path` varchar(90) DEFAULT '',
  `input_refund_rate` decimal(5,2) DEFAULT 0.00,
  `display_order` int(11) DEFAULT 0,
  `deduction_refund_rate` decimal(5,2) DEFAULT 0.00,
  `is_margin_refund` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `lsports_sports_innodb`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `lsports_sports_innodb` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) DEFAULT NULL,
  `name` varchar(45) DEFAULT NULL,
  `display_name` varchar(45) DEFAULT NULL,
  `bet_type` int(11) DEFAULT NULL,
  `lang` varchar(4) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` varchar(45) DEFAULT NULL,
  `is_delete` tinyint(4) DEFAULT 0,
  `is_use` tinyint(4) DEFAULT 1,
  `image_path` varchar(90) DEFAULT '',
  `input_refund_rate` decimal(5,2) DEFAULT 0.00,
  `display_order` int(11) DEFAULT 0,
  `deduction_refund_rate` decimal(5,2) DEFAULT 0.00,
  `is_margin_refund` int(11) DEFAULT 0,
  PRIMARY KEY (`idx`),
  KEY `id_idx` (`id`),
  KEY `use_type` (`is_use`,`bet_type`),
  KEY `idx_type` (`bet_type`)
) ENGINE=InnoDB AUTO_INCREMENT=294 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `member`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `id` varchar(45) NOT NULL COMMENT '회원가입시 입력하는 아이디 ',
  `is_exchange` int(11) DEFAULT 0,
  `charge_first_per` int(11) DEFAULT 0,
  `password` varchar(200) DEFAULT NULL,
  `login_key` varchar(200) DEFAULT NULL,
  `nick_name` varchar(45) DEFAULT NULL COMMENT '닉네임 ',
  `u_business` tinyint(4) DEFAULT 1 COMMENT '회원 구분, 1:일반,2 : 하위 총판 , 3 : 총판, 4: 대총판 \n',
  `money` int(11) DEFAULT 0 COMMENT '충전한 현금 ',
  `point` int(11) DEFAULT 0 COMMENT '게임 후 정산된 포인트. 환전할 수도 있고 배팅도 할수 있다.',
  `betting_p` int(11) DEFAULT 0 COMMENT '낙첨포인트',
  `call` varchar(45) DEFAULT NULL COMMENT '전화 번호',
  `is_recommend` enum('Y','N') DEFAULT 'N' COMMENT '추천, Y:가능, N:불가능',
  `status` tinyint(4) DEFAULT 11 COMMENT '회원상태 ( 1:정상, 2:정지, 3:탈퇴, 11:승인 대기회원 )',
  `level` int(11) DEFAULT 1,
  `auto_level` enum('Y','N') DEFAULT 'Y' COMMENT '자동렙업, Y:on, N:off',
  `last_login` datetime DEFAULT NULL COMMENT '최종 로그인',
  `last_page` varchar(45) DEFAULT NULL COMMENT '마지막 접속 위치 ',
  `MICRO` varchar(10) DEFAULT NULL COMMENT '아직은 사용하지 않을 예정 \n마이크로게이밍과 아시아게이밍이라는 온라인카지노업체에 api게임 연동시 사용',
  `AG` varchar(10) DEFAULT NULL COMMENT '아직은 사용하지 않을 예정 \n마이크로게이밍과 아시아게이밍이라는 온라인카지노업체에 api게임 연동시 사용',
  `recommend_code` varchar(45) DEFAULT NULL COMMENT '추천인 코드',
  `recommend_member` int(11) DEFAULT 0 COMMENT '사용자 입력 추천인 회원 idx ',
  `recommend_code_dt` datetime DEFAULT NULL,
  `account_number` varchar(45) DEFAULT NULL COMMENT '계좌 번호 ',
  `account_name` varchar(45) DEFAULT NULL COMMENT '계좌 소유주 이름 ',
  `account_bank` varchar(45) DEFAULT NULL COMMENT '계좌 은행 ',
  `exchange_password` varchar(200) DEFAULT NULL COMMENT '환전 비밀 번호 ',
  `is_monitor` enum('Y','N') DEFAULT 'N' COMMENT '일반 모니터링 Y:on, N:off',
  `is_monitor_charge` enum('Y','N') DEFAULT 'N' COMMENT '충전 모니터링 Y:on, N:off',
  `is_monitor_security` enum('Y','N') DEFAULT 'N' COMMENT '보안 모니터링 Y:on, N:off',
  `is_monitor_bet` enum('Y','N') DEFAULT 'N' COMMENT '중복베팅 모니터링 Y:on, N:off',
  `dis_id` varchar(45) DEFAULT NULL COMMENT '소속 총판 ID',
  `dis_line_id` varchar(45) DEFAULT NULL COMMENT '소속 총판라인 ID',
  `reg_time` timestamp NULL DEFAULT current_timestamp() COMMENT '등록일',
  `session_key` varchar(100) DEFAULT NULL,
  `random_code` varchar(45) DEFAULT NULL,
  `reg_first_charge` int(11) DEFAULT 0,
  `is_sound` enum('Y','N') DEFAULT 'Y',
  `access_token` varchar(512) DEFAULT '',
  `transaction_key` varchar(45) DEFAULT '',
  `is_coin_guid` enum('Y','N') DEFAULT 'N',
  `coin_password` varchar(200) DEFAULT '',
  `channel` int(11) DEFAULT 0,
  `check_login` datetime DEFAULT current_timestamp(),
  `leave_time` datetime DEFAULT NULL,
  `is_betting_slip` enum('ON','OFF') DEFAULT 'OFF',
  `birth` varchar(8) DEFAULT NULL COMMENT '생년월일',
  `mobile_carrier` tinyint(4) DEFAULT 0 COMMENT '0-sk, 1-kt, 2-lg, 3-skt알뜰, 5-kt알뜰, 6-lg알뜰',
  `g_point` int(11) DEFAULT 0,
  `g_money` int(11) DEFAULT 0,
  `is_set_day_nt_gm` enum('Y','N') DEFAULT NULL COMMENT '게시판 활동시 gm 을 하루에 한번 받았는지 체크해준다.',
  `a_ip` varchar(30) DEFAULT NULL,
  `a_before_ip` varchar(30) DEFAULT NULL,
  `keep_login_access_token` varchar(50) DEFAULT NULL,
  `dist_type` tinyint(4) DEFAULT 0 COMMENT '총판 유형 : 0 기본, 1: 죽장, 2: 롤링, 3: 배너 ',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `id_UNIQUE` (`id`),
  UNIQUE KEY `nick_name_UNIQUE` (`nick_name`),
  KEY `rc_idx` (`recommend_member`),
  KEY `id` (`id`),
  KEY `dis_id` (`dis_id`),
  KEY `idx_level` (`idx`,`level`)
) ENGINE=InnoDB AUTO_INCREMENT=41664 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='회원 테이블';

--
-- Table structure for table `member_bet`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_bet` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `u_key` varchar(64) DEFAULT NULL COMMENT 't_log_cash 연동 키 ',
  `member_idx` int(11) DEFAULT NULL COMMENT '유저 아이디 -MemberModel',
  `bet_type` int(11) DEFAULT 0 COMMENT '1 : 프리매치 2: 실시간 3 : 파워볼,4파워사다리 5: 키노사다리 6 : 가상축구 7: 카지노 8: 슬롯',
  `bet_status` int(11) DEFAULT 1 COMMENT '1: 게임 결과 전\\\\\\\\n2: 적중 - 정산 전 \\\\\\\\n3: 적중 - 정산 완료\\\\\\\\n4: 적중 실패 \\\\\\\\n5: 취소 , \\\\\\\\n 6:적특',
  `game_type` int(11) DEFAULT 0,
  `bonus_price` double DEFAULT 1 COMMENT '3폴더, 5폴더 이상 보너스 처리 위함. 정산시 입력 됨.',
  `total_bet_money` int(11) DEFAULT NULL COMMENT '총 배팅 금액',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `calculate_dt` datetime DEFAULT NULL COMMENT '정산처리 시간',
  `folder_type` enum('S','D') DEFAULT NULL COMMENT 'S 싱글 D : 다폴더',
  `round` int(11) DEFAULT 0,
  `take_money` int(11) DEFAULT 0,
  `is_open` tinyint(4) DEFAULT 0 COMMENT '0-운영자 미확인, 1-운영자 확인',
  `is_hide` tinyint(4) DEFAULT 0 COMMENT '0-유저 보이기, 1-유저 숨기기',
  `take_point` int(11) DEFAULT 0,
  `recom_take_point` int(11) DEFAULT 0,
  `cancel_type` tinyint(4) DEFAULT 0 COMMENT '취소타입(0-유저, 1-관리자)',
  `passivity_hit_flag` tinyint(4) DEFAULT 0 COMMENT '0 : 자동 적특 1: 수동적특 ',
  `is_betting_slip` enum('ON','OFF') DEFAULT 'OFF',
  `item_idx` bigint(20) DEFAULT 0 COMMENT 'member_item 의 고유키값 ',
  `flag_bet_sum` varchar(2) DEFAULT 'P' COMMENT 'P : 베팅 , M : 낙첨시 롤백',
  `item_bonus_price` double DEFAULT 0,
  `bet_count` tinyint(4) DEFAULT 0,
  `is_classic` enum('ON','OFF') DEFAULT 'OFF',
  PRIMARY KEY (`idx`),
  KEY `create_dt` (`create_dt`),
  KEY `cal_dt` (`calculate_dt`),
  KEY `idx_member_idx` (`member_idx`),
  KEY `idx_bt` (`bet_type`)
) ENGINE=InnoDB AUTO_INCREMENT=658637 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배팅 내역 ';

--
-- Table structure for table `member_bet_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_bet_backup` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `u_key` varchar(64) DEFAULT NULL COMMENT 't_log_cash 연동 키 ',
  `member_idx` int(11) DEFAULT NULL COMMENT '유저 아이디 -MemberModel',
  `bet_type` int(11) DEFAULT 0 COMMENT '1 : 프리매치 2: 실시간 3 : 파워볼,4파워사다리 5: 키노사다리 6 : 가상축구 7: 카지노 8: 슬롯',
  `bet_status` int(11) DEFAULT 1 COMMENT '1: 게임 결과 전\\\\\\\\n2: 적중 - 정산 전 \\\\\\\\n3: 적중 - 정산 완료\\\\\\\\n4: 적중 실패 \\\\\\\\n5: 취소 , \\\\\\\\n 6:적특',
  `game_type` int(11) DEFAULT 0,
  `bonus_price` double DEFAULT 1 COMMENT '3폴더, 5폴더 이상 보너스 처리 위함. 정산시 입력 됨.',
  `total_bet_money` int(11) DEFAULT NULL COMMENT '총 배팅 금액',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `calculate_dt` datetime DEFAULT NULL COMMENT '정산처리 시간',
  `folder_type` enum('S','D') DEFAULT NULL COMMENT 'S 싱글 D : 다폴더',
  `round` int(11) DEFAULT 0,
  `take_money` int(11) DEFAULT 0,
  `is_open` tinyint(4) DEFAULT 0 COMMENT '0-운영자 미확인, 1-운영자 확인',
  `is_hide` tinyint(4) DEFAULT 0 COMMENT '0-유저 보이기, 1-유저 숨기기',
  `take_point` int(11) DEFAULT 0,
  `recom_take_point` int(11) DEFAULT 0,
  `cancel_type` tinyint(4) DEFAULT 0 COMMENT '취소타입(0-유저, 1-관리자)',
  `passivity_hit_flag` tinyint(4) DEFAULT 0 COMMENT '0 : 자동 적특 1: 수동적특 ',
  `is_betting_slip` enum('ON','OFF') DEFAULT 'OFF',
  `item_idx` bigint(20) DEFAULT 0 COMMENT 'member_item 의 고유키값 ',
  `flag_bet_sum` varchar(2) DEFAULT 'P' COMMENT 'P : 베팅 , M : 낙첨시 롤백',
  `item_bonus_price` double DEFAULT 0,
  `bet_count` tinyint(4) DEFAULT 0,
  `is_classic` enum('ON','OFF') DEFAULT 'OFF'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `member_bet_detail`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_bet_detail` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `bet_idx` int(11) DEFAULT NULL COMMENT '배팅 아이디 -MemberBetModel',
  `ls_bet_id` bigint(20) DEFAULT NULL COMMENT 'LS 배팅 아이디 -LSportsBetModel',
  `ls_fixture_id` int(11) DEFAULT NULL,
  `ls_markets_id` int(11) DEFAULT NULL,
  `ls_markets_name` varchar(45) DEFAULT NULL,
  `ls_markets_base_line` varchar(45) DEFAULT NULL,
  `bet_type` int(11) DEFAULT 0,
  `bet_price` double DEFAULT NULL COMMENT '배팅 당시 !! 사용자가 배팅 한 !! 마켓에 대한 배당률',
  `bet_status` int(11) DEFAULT 1 COMMENT '1: 게임 결과 전\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n2: 적중 - 정산 전\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n3: 적중 - 정산 완료\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n4: 적중 실패  \\\\\\\\\\\\\\\\n5: 취소, \\\\\\\\\\\\\\\\n 6:적특',
  `bet_name` varchar(50) DEFAULT '',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `fixture_start_date` datetime DEFAULT current_timestamp(),
  `fixture_sport_id` int(11) DEFAULT 0,
  `fixture_location_id` int(11) DEFAULT 0,
  `fixture_league_id` int(11) DEFAULT 0,
  `fixture_participants_1_id` int(11) DEFAULT 0,
  `fixture_participants_2_id` int(11) DEFAULT 0,
  `result_score` mediumtext DEFAULT '',
  `passivity_hit_flag` tinyint(4) DEFAULT 0 COMMENT '0 : 자동적특  1 : 수동적특',
  `other_ls_bet_id` bigint(20) DEFAULT 0,
  `other_bet_price` double DEFAULT 0,
  `other_bet_name` varchar(50) DEFAULT '',
  PRIMARY KEY (`idx`),
  KEY `index_bet_id` (`bet_idx`),
  KEY `bet_id` (`ls_bet_id`),
  KEY `index_fix_id` (`ls_fixture_id`,`bet_type`,`bet_status`),
  KEY `idx_cr_dt` (`create_dt`)
) ENGINE=InnoDB AUTO_INCREMENT=1921487 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배팅 내역 상세';

--
-- Table structure for table `member_bet_detail_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_bet_detail_backup` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `bet_idx` int(11) DEFAULT NULL COMMENT '배팅 아이디 -MemberBetModel',
  `ls_bet_id` bigint(20) DEFAULT NULL COMMENT 'LS 배팅 아이디 -LSportsBetModel',
  `ls_fixture_id` int(11) DEFAULT NULL,
  `ls_markets_id` int(11) DEFAULT NULL,
  `ls_markets_name` varchar(45) DEFAULT NULL,
  `ls_markets_base_line` varchar(45) DEFAULT NULL,
  `bet_type` int(11) DEFAULT 0,
  `bet_price` double DEFAULT NULL COMMENT '배팅 당시 !! 사용자가 배팅 한 !! 마켓에 대한 배당률',
  `bet_status` int(11) DEFAULT 1 COMMENT '1: 게임 결과 전\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n2: 적중 - 정산 전\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n3: 적중 - 정산 완료\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n4: 적중 실패  \\\\\\\\\\\\\\\\n5: 취소, \\\\\\\\\\\\\\\\n 6:적특',
  `bet_name` varchar(50) DEFAULT '',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `fixture_sport_id` int(11) DEFAULT 0,
  `fixture_location_id` int(11) DEFAULT 0,
  `fixture_league_id` int(11) DEFAULT 0,
  `fixture_participants_1_id` int(11) DEFAULT 0,
  `fixture_participants_2_id` int(11) DEFAULT 0,
  `result_score` mediumtext DEFAULT '',
  `passivity_hit_flag` tinyint(4) DEFAULT 0 COMMENT '0 : 자동적특  1 : 수동적특',
  `other_ls_bet_id` bigint(20) DEFAULT 0,
  `other_bet_price` double DEFAULT 0,
  `other_bet_name` varchar(50) DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `member_extend`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_extend` (
  `member_idx` int(11) NOT NULL,
  `betting_dt` datetime DEFAULT NULL COMMENT '최종 배팅시간',
  PRIMARY KEY (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='유저들 확장정보';

--
-- Table structure for table `member_game_type`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_game_type` (
  `member_idx` int(11) NOT NULL DEFAULT 0,
  `game_type` int(11) NOT NULL DEFAULT 0,
  `status` enum('ON','OFF') NOT NULL DEFAULT 'ON',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`member_idx`,`game_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `member_ip_block_history`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_ip_block_history` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` varchar(50) DEFAULT NULL,
  `member_idx` int(11) DEFAULT NULL,
  `login_history_idx` int(11) DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `country` varchar(45) DEFAULT NULL,
  `memo` varchar(45) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  UNIQUE KEY `UQ_IP_BLOCK_U01` (`ip`),
  KEY `idx_create` (`create_dt`)
) ENGINE=InnoDB AUTO_INCREMENT=467 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `member_item`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_item` (
  `idx` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'idx',
  `member_idx` int(11) DEFAULT 0,
  `item_id` int(11) DEFAULT 0,
  `item_value` decimal(6,2) DEFAULT 0.00,
  `status` tinyint(2) DEFAULT 0 COMMENT '0 : 미사용 1 : 사용 ',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=6319 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='유저 보유 아이템';

--
-- Table structure for table `member_level_up`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_level_up` (
  `level` int(11) NOT NULL DEFAULT 0,
  `charge` int(11) DEFAULT 0,
  `exchange` int(11) DEFAULT 0,
  `calcurate` int(11) DEFAULT 0,
  `charge_count` int(11) DEFAULT 0,
  `nonDepositDatePeriod` int(11) DEFAULT 0,
  `flag` enum('ON','OFF') DEFAULT 'ON',
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `create_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `member_login_history`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_login_history` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `member_idx` int(11) DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `country` varchar(45) DEFAULT NULL,
  `block` varchar(45) DEFAULT NULL,
  `login_domain` varchar(100) DEFAULT NULL COMMENT '접속 도메인',
  `agent` text DEFAULT NULL COMMENT 'user agent 정보',
  `agent_hash` varchar(50) DEFAULT NULL,
  `agent_device` varchar(50) DEFAULT NULL COMMENT 'user agent 정보, 디바이스',
  `agent_browser` varchar(50) DEFAULT NULL COMMENT 'user agent 정보, 브라우저',
  `login_yn` enum('Y','N') DEFAULT NULL COMMENT 'login Y: 성공, N:실패',
  `login_datetime` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  KEY `idx_mb_idx` (`member_idx`,`ip`)
) ENGINE=InnoDB AUTO_INCREMENT=810717 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='로그인 내역 ';

--
-- Table structure for table `member_money_charge_history`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_money_charge_history` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `u_key` varchar(64) DEFAULT NULL COMMENT 't_log_cash u_key 와 연결 ',
  `member_idx` int(11) DEFAULT NULL COMMENT '충전 신청자 멤버 idx ',
  `admin_idx` int(11) DEFAULT NULL COMMENT '관리자 idx ',
  `deposit_name` varchar(45) DEFAULT NULL COMMENT '입금자 명 ',
  `bank_id` int(11) DEFAULT 0,
  `bank_name` varchar(45) DEFAULT '',
  `account_number` varchar(45) DEFAULT '',
  `account_name` varchar(45) DEFAULT '',
  `money` int(11) DEFAULT NULL COMMENT '충전 금액 ',
  `result_money` int(11) DEFAULT 0,
  `bonus_money` int(11) DEFAULT NULL,
  `bonus_point` int(11) DEFAULT 0,
  `set_type` varchar(50) DEFAULT '',
  `status` int(11) DEFAULT NULL COMMENT '1: 입금 전 (신청) 2: 입금 확인 (대기) 3: 충전 완료 (완료) 4: 취소 10: 배팅적중 11:관리자 취소  \\\\n999: 오류',
  `comment` varchar(100) DEFAULT NULL COMMENT 'Status comment ',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() COMMENT '관리자 처리 일자',
  `delete_dt` datetime DEFAULT NULL,
  `referenceId` varchar(45) DEFAULT '',
  `sms_status` varchar(45) DEFAULT '',
  `is_sound` enum('Y','N') DEFAULT 'Y',
  `sports_bet_s_money` int(11) DEFAULT 0,
  `sports_bet_d_money` int(11) DEFAULT 0,
  `real_bet_s_money` int(11) DEFAULT 0,
  `real_bet_d_money` int(11) DEFAULT 0,
  `mini_bet_money` int(11) DEFAULT 0,
  `casino_bet_money` int(11) DEFAULT 0,
  `slot_bet_money` int(11) DEFAULT 0,
  `esports_bet_money` int(11) DEFAULT 0,
  `hash_bet_money` int(11) DEFAULT 0,
  `charge_point_yn` tinyint(1) unsigned DEFAULT 1 COMMENT '충전포인트 (0-받지않음, 1-받음)',
  `bonus_option_idx` int(11) DEFAULT 0 COMMENT '선택한 보너스 옵션(-1:적용안함, 0:디폴트 보너스,1: 1번보너스 2:2번 보너스)',
  `ratio_value` int(11) DEFAULT 0 COMMENT '보너스 비율',
  `const_value` int(11) DEFAULT 0 COMMENT '보너스 금액',
  `manual_bonus_point` int(11) DEFAULT 0 COMMENT '수동지급 포인트',
  `bonus_level` int(11) DEFAULT 0,
  PRIMARY KEY (`idx`),
  KEY `status_member_idx` (`status`,`member_idx`),
  KEY `idx_create_dt` (`create_dt`),
  KEY `idx_mb_idx` (`member_idx`),
  KEY `idx_status` (`status`),
  KEY `idx_update_dt` (`update_dt`)
) ENGINE=InnoDB AUTO_INCREMENT=245515 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='충전 / 환전 내역 ';

--
-- Table structure for table `member_money_charge_sms`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_money_charge_sms` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `deposit_name` varchar(45) DEFAULT NULL COMMENT '입금자 명 ',
  `bank_id` int(11) DEFAULT 0 COMMENT '은행번호',
  `bank_name` varchar(45) DEFAULT '0' COMMENT '은행명',
  `money` int(11) DEFAULT NULL COMMENT '충전 금액 ',
  `status` int(11) DEFAULT NULL COMMENT '1: 입금 전 (신청) 2: 시간초과(완료) 3: 자동충전 완료 (완료) 4: 운영자 완료 \\\\n999: 오류',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT NULL COMMENT '처리 일자',
  `ori` text DEFAULT '' COMMENT '원문',
  PRIMARY KEY (`idx`),
  KEY `st_bk_idx` (`deposit_name`,`bank_id`,`money`,`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='입금sms 내역';

--
-- Table structure for table `member_money_exchange_history`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_money_exchange_history` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `u_key` varchar(64) DEFAULT NULL COMMENT 't_log_cash u_key 와 연결 ',
  `member_idx` int(11) DEFAULT NULL COMMENT '환전 신청자 멤버 idx ',
  `admin_idx` int(11) DEFAULT NULL COMMENT '관리자 idx ',
  `money` int(11) DEFAULT NULL COMMENT '환전 금액 ',
  `result_money` int(11) DEFAULT 0,
  `comment` varchar(100) DEFAULT NULL COMMENT 'Status comment ',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp(),
  `delete_dt` datetime DEFAULT NULL,
  `set_type` varchar(50) DEFAULT '',
  `is_sound` enum('Y','N') DEFAULT 'Y',
  `status` int(11) DEFAULT NULL COMMENT '1: 환전 신청 (신청)  \\\\n2: 환전 대기 (대기)  \\\\n3: 환전 완료 (완료)  \\\\n4: 관리자 취소  \\\\n999: 오류',
  PRIMARY KEY (`idx`),
  KEY `idx_s_u_m` (`member_idx`),
  KEY `status_member_idx` (`status`) USING BTREE,
  KEY `idx_create_dt` (`update_dt`),
  KEY `idx_update_dt` (`update_dt`)
) ENGINE=InnoDB AUTO_INCREMENT=58639 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='환전 내역 ';

--
-- Table structure for table `member_summary`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_summary` (
  `member_idx` int(11) NOT NULL DEFAULT 0 COMMENT '유저번호',
  `total_deposit_money` int(11) DEFAULT NULL COMMENT '총입금액',
  `total_withdraw_money` int(11) DEFAULT NULL COMMENT '총출금액',
  `total_deposit_count` int(11) DEFAULT NULL COMMENT '총입금횟수',
  `total_withdraw_count` int(11) DEFAULT NULL COMMENT '총출금횟수',
  `max_deposit_money` int(11) DEFAULT NULL COMMENT '최대 입금액',
  `max_withdraw_money` int(11) DEFAULT NULL COMMENT '최대 출금액',
  `total_betting_money` int(11) DEFAULT NULL COMMENT '총 배팅금액',
  `total_betting_count` int(11) DEFAULT NULL COMMENT '총 배팅횟수',
  `total_betting_win_money` int(11) DEFAULT NULL COMMENT '총 당첨금액',
  PRIMARY KEY (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='유저 종합내역';

--
-- Table structure for table `member_update_history`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `member_update_history` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `a_id` varchar(50) DEFAULT '',
  `member_idx` int(11) DEFAULT NULL,
  `update_type` varchar(45) DEFAULT NULL COMMENT '변경 항목 ',
  `before_data` text DEFAULT NULL,
  `after_data` text DEFAULT NULL,
  `create_dt` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=44631 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='로그인 내역 ';

--
-- Table structure for table `menu_board`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `menu_board` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `member_idx` int(11) DEFAULT NULL COMMENT '글쓴이 (회원) ',
  `a_id` varchar(45) DEFAULT NULL COMMENT '담당자 (관리자) ',
  `nick_name` varchar(45) DEFAULT '',
  `title` varchar(100) DEFAULT NULL,
  `contents` text DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `display` tinyint(4) NOT NULL DEFAULT 0 COMMENT '노출여부 가 아니라 공지여부',
  PRIMARY KEY (`idx`),
  KEY `member_idx_create_dt` (`member_idx`,`create_dt`),
  KEY `member_idx` (`member_idx`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='메뉴 상단 ‘게시판’';

--
-- Table structure for table `menu_board_comment`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `menu_board_comment` (
  `idx` int(10) NOT NULL AUTO_INCREMENT COMMENT '댓글 idx',
  `board_idx` int(11) NOT NULL COMMENT '글번호 idx',
  `member_idx` int(11) NOT NULL COMMENT '작성자 idx',
  `nick_name` varchar(45) NOT NULL COMMENT '닉네임',
  `comment` text NOT NULL COMMENT '댓글',
  `display` tinyint(1) NOT NULL DEFAULT 1 COMMENT '노출 여부 (0: 미노출, 1: 노출)',
  `create_dt` datetime DEFAULT current_timestamp() COMMENT '작성일',
  PRIMARY KEY (`idx`),
  KEY `IDX_BOARD_IDX` (`board_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='게시판 댓글';

--
-- Table structure for table `menu_board_file`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `menu_board_file` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '게시판 파일 idx',
  `board_idx` int(11) NOT NULL COMMENT '게시판 idx',
  `file_name` varchar(200) DEFAULT NULL COMMENT '파일명',
  `file_path` varchar(200) DEFAULT NULL COMMENT '파일 경로',
  `create_dt` datetime DEFAULT current_timestamp() COMMENT '작성 시간',
  PRIMARY KEY (`idx`),
  KEY `member_idx` (`board_idx`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='게시판 파일';

--
-- Table structure for table `menu_qna`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `menu_qna` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `member_idx` int(11) DEFAULT NULL COMMENT '글쓴이 (회원) ',
  `a_id` varchar(45) DEFAULT NULL COMMENT '담당자 (관리자) ',
  `title` varchar(100) DEFAULT NULL,
  `contents` text DEFAULT NULL,
  `is_answer` enum('Y','N') DEFAULT 'N',
  `is_view` enum('Y','N') DEFAULT 'Y',
  `is_status` enum('Y','D') DEFAULT 'Y',
  `is_sound` enum('Y','N') DEFAULT 'Y' COMMENT '운영툴에서 소리를 낼지 말지 판단',
  `answer` text DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  KEY `member_idx` (`member_idx`),
  KEY `member_idx_create_dt` (`create_dt`)
) ENGINE=InnoDB AUTO_INCREMENT=41628 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='메뉴 상단 ‘고객센터’';

--
-- Table structure for table `mini_game`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `mini_game` (
  `game` varchar(16) NOT NULL DEFAULT '' COMMENT '게임',
  `id` int(11) NOT NULL DEFAULT 0 COMMENT '회차',
  `cnt` int(11) DEFAULT 0,
  `bet_type` int(11) NOT NULL COMMENT '1 : 프리매치 2: 실시간 3 : 파워볼,4파워사다리 5: 키노사다리 6 : 가상축구 ',
  `admin_bet_status` enum('ON','OFF','RETRY') DEFAULT 'ON',
  `start_dt` datetime DEFAULT current_timestamp() COMMENT 'KST ',
  `end_dt` datetime DEFAULT current_timestamp() COMMENT 'KST ',
  `result` mediumtext DEFAULT '',
  `result_score` mediumtext DEFAULT '',
  `league` varchar(45) DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `start_dt` (`start_dt`,`end_dt`),
  KEY `end_dt` (`end_dt`,`bet_type`),
  KEY `idx_bet_type` (`bet_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `mini_game_bet`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `mini_game_bet` (
  `game` varchar(16) NOT NULL DEFAULT '' COMMENT '게임',
  `markets_id` int(11) NOT NULL COMMENT '마켓 아이디',
  `markets_name` varchar(45) DEFAULT '0' COMMENT '마켓명',
  `bet_price` double DEFAULT NULL COMMENT '베당률',
  PRIMARY KEY (`game`,`markets_id`),
  KEY `markets_id` (`markets_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배팅';

--
-- Table structure for table `mini_game_bet_config`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `mini_game_bet_config` (
  `bet_type` int(11) NOT NULL DEFAULT 0 COMMENT '1 : 프리매치 2: 실시간 3 : 파워볼,4파워사다리 5: 키노사다리 6 : 가상축구 ',
  `game` varchar(16) NOT NULL DEFAULT '' COMMENT '게임',
  `level` int(11) NOT NULL DEFAULT 0 COMMENT '레벨',
  `min` int(11) DEFAULT 0 COMMENT '최소',
  `max` int(11) DEFAULT 0 COMMENT '최대',
  `limit` int(11) DEFAULT 0 COMMENT '상한',
  `reward` decimal(5,2) DEFAULT 0.00 COMMENT '리워드%',
  PRIMARY KEY (`bet_type`,`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='배팅 설정';

--
-- Table structure for table `mini_game_member_bet`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `mini_game_member_bet` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `u_key` varchar(64) DEFAULT NULL COMMENT 't_log_cash 연동 키 ',
  `member_idx` int(11) DEFAULT 0 COMMENT '유저 아이디 -MemberModel',
  `bet_type` int(11) DEFAULT 0 COMMENT '1 : 프리매치 2: 실시간 3 : 파워볼,4파워사다리 5: 키노사다리 6 : 가상축구 ',
  `bet_status` int(11) DEFAULT 1 COMMENT '1: 게임 결과 전\\\\\\\\n2: 적중 - 정산 전 \\\\\\\\n3: 적중 - 정산 완료\\\\\\\\n4: 적중 실패 \\\\\\\\n5: 취소 , \\\\\\\\n 6:적특',
  `total_bet_money` int(11) DEFAULT 0 COMMENT '총 배팅 금액',
  `bet_price` double DEFAULT 0 COMMENT '배당률',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `calculate_dt` datetime DEFAULT NULL COMMENT '정산처리 시간',
  `ls_fixture_id` int(11) DEFAULT 0 COMMENT '경기 회차번호',
  `ls_markets_id` int(11) DEFAULT 0,
  `ls_markets_name` varchar(45) DEFAULT NULL,
  `round` int(11) DEFAULT 0 COMMENT '미니게임 회차번호',
  `take_money` int(11) DEFAULT 0,
  `take_point` int(11) DEFAULT 0,
  `is_open` tinyint(4) DEFAULT 0 COMMENT '0-운영자 미확인, 1-운영자 확인',
  `is_hide` tinyint(4) DEFAULT 0 COMMENT '0-유저 보이기, 1-유저 숨기기',
  PRIMARY KEY (`idx`),
  KEY `index_mb_id` (`member_idx`),
  KEY `idx_ct` (`ls_markets_id`,`create_dt`),
  KEY `member_idx_update_dt_bet_status` (`member_idx`,`update_dt`,`bet_status`) USING BTREE,
  KEY `idx_cal_dt` (`calculate_dt`)
) ENGINE=InnoDB AUTO_INCREMENT=157567 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='미니게임 배팅내역 ';

--
-- Table structure for table `mini_game_member_bet_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `mini_game_member_bet_backup` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `u_key` varchar(64) DEFAULT NULL COMMENT 't_log_cash 연동 키 ',
  `member_idx` int(11) DEFAULT 0 COMMENT '유저 아이디 -MemberModel',
  `bet_type` int(11) DEFAULT 0 COMMENT '1 : 프리매치 2: 실시간 3 : 파워볼,4파워사다리 5: 키노사다리 6 : 가상축구 ',
  `bet_status` int(11) DEFAULT 1 COMMENT '1: 게임 결과 전\\\\\\\\n2: 적중 - 정산 전 \\\\\\\\n3: 적중 - 정산 완료\\\\\\\\n4: 적중 실패 \\\\\\\\n5: 취소 , \\\\\\\\n 6:적특',
  `total_bet_money` int(11) DEFAULT 0 COMMENT '총 배팅 금액',
  `bet_price` double DEFAULT 0 COMMENT '배당률',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `calculate_dt` datetime DEFAULT NULL COMMENT '정산처리 시간',
  `ls_fixture_id` int(11) DEFAULT 0 COMMENT '경기 회차번호',
  `ls_markets_id` int(11) DEFAULT 0,
  `ls_markets_name` varchar(45) DEFAULT NULL,
  `round` int(11) DEFAULT 0 COMMENT '미니게임 회차번호',
  `take_money` int(11) DEFAULT 0,
  `take_point` int(11) DEFAULT 0,
  `is_open` tinyint(4) DEFAULT 0 COMMENT '0-운영자 미확인, 1-운영자 확인',
  `is_hide` tinyint(4) DEFAULT 0 COMMENT '0-유저 보이기, 1-유저 숨기기'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `money_order_history`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `money_order_history` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `type` int(11) DEFAULT NULL COMMENT '1:kwin, 2:asbet, 3:tiger, 4:onoff, 5"bitup',
  `member_idx` int(11) DEFAULT NULL COMMENT '입금 신청자 멤버번호 ',
  `order_name` varchar(45) DEFAULT NULL COMMENT '입금자명(가상계좌 입금자명으로 노출)',
  `order_bank_id` int(11) DEFAULT 0 COMMENT '입금자 은행번호',
  `order_bank_code` varchar(45) DEFAULT '' COMMENT '입금자 은행코드',
  `order_account_number` varchar(45) DEFAULT '' COMMENT '입금할 통장의 계좌번호',
  `with_hp` varchar(45) DEFAULT '' COMMENT '입금자 은행에 등록된 휴대번호',
  `money` int(11) DEFAULT NULL COMMENT '입금액',
  `status` int(11) DEFAULT NULL COMMENT '1: 신청, 2: 완료',
  `virtual_account_bank` varchar(90) DEFAULT '' COMMENT '가상계좌은행명',
  `virtual_account_number` varchar(45) DEFAULT '' COMMENT '가상계좌번호',
  `moid` varchar(60) DEFAULT '' COMMENT '주문번호',
  `tid` varchar(60) DEFAULT '' COMMENT '거래번호',
  `deposit_money` int(11) DEFAULT NULL COMMENT '정산예정금액',
  `consume` int(11) DEFAULT 0 COMMENT '유저계정 입금처리여부',
  `create_dt` datetime DEFAULT current_timestamp(),
  `deposit_dt` datetime DEFAULT current_timestamp() COMMENT '입금일시',
  `update_dt` datetime DEFAULT current_timestamp() COMMENT '처리일자',
  PRIMARY KEY (`idx`),
  KEY `type` (`type`),
  KEY `idx_status` (`status`),
  KEY `idx_create_dt` (`create_dt`),
  KEY `idx_mb_idx` (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='결제현황';

--
-- Table structure for table `notices`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `notices` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT '',
  `thumbnail` varchar(1024) DEFAULT '',
  `detail` varchar(1024) DEFAULT '',
  `status` tinyint(4) DEFAULT 1 COMMENT '0-미사용, 1-사용',
  `del_flag` tinyint(4) DEFAULT 0 COMMENT '0-존재, 1-삭제됨',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='공지테이블';

--
-- Table structure for table `personal_account_number`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `personal_account_number` (
  `member_idx` int(11) NOT NULL DEFAULT 0,
  `account_number_1` varchar(45) DEFAULT '',
  `account_name_1` varchar(45) DEFAULT '',
  `account_bank_1` varchar(45) DEFAULT '',
  `account_number_2` varchar(45) DEFAULT '',
  `account_name_2` varchar(45) DEFAULT '',
  `account_bank_2` varchar(45) DEFAULT '',
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `create_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `popups`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `popups` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `thumbnail` varchar(1024) DEFAULT '',
  `status` tinyint(4) DEFAULT 1 COMMENT '0-미사용, 1-사용',
  `rank` tinyint(1) DEFAULT NULL COMMENT '팝업순번',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `delete_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  KEY `thumbnail` (`thumbnail`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='팝업 테이블';

--
-- Table structure for table `rmq_redis_timestamp`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `rmq_redis_timestamp` (
  `idx` bigint(20) NOT NULL AUTO_INCREMENT,
  `start_time` bigint(20) NOT NULL DEFAULT 0,
  `start_time_inplay` bigint(20) NOT NULL DEFAULT 0,
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `shop_calculate_result`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `shop_calculate_result` (
  `member_idx` int(11) NOT NULL DEFAULT 0 COMMENT '유저번호(매장)',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp() COMMENT '지급한 날짜',
  `calculate_dt` datetime DEFAULT NULL COMMENT '정산에 사용한 데이터의 날짜',
  `calculate_point` decimal(11,2) DEFAULT 0.00 COMMENT '정산금',
  `be_point` int(11) DEFAULT 0,
  `af_point` int(11) DEFAULT 0,
  `ch_val` decimal(11,2) DEFAULT 0.00 COMMENT '입금',
  `ex_val` decimal(11,2) DEFAULT 0.00 COMMENT '출금',
  `pre_bet_sum_s` decimal(11,2) DEFAULT 0.00 COMMENT '프리싱글 정산금',
  `pre_bet_sum_d` decimal(11,2) DEFAULT 0.00 COMMENT '프리멀티 정산금',
  `pre_bet_sum_d_2` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_3` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_4` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_5_more` decimal(11,2) DEFAULT 0.00,
  `real_bet_sum_s` decimal(11,2) DEFAULT 0.00 COMMENT '실시간싱글 정산금',
  `real_bet_sum_d` decimal(11,2) DEFAULT 0.00 COMMENT '실시간멀티 정산금',
  `mini_bet_sum` decimal(11,2) DEFAULT 0.00 COMMENT '미니게임 정산금',
  `total_casino_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_slot_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_hash_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_espt_bet_money` decimal(11,2) DEFAULT 0.00,
  `bet_pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치싱글 수수료',
  `bet_pre_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치다폴더 수수료',
  `bet_pre_d_2_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_3_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_4_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_5_more_fee` decimal(7,2) DEFAULT 0.00,
  `bet_real_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간싱글 수수료',
  `bet_real_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간다폴더 수수료',
  `bet_mini_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 미니게임 수수료',
  `pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 수수료',
  `bet_casino_fee` decimal(7,2) DEFAULT 0.00,
  `bet_slot_fee` decimal(7,2) DEFAULT 0.00,
  `bet_espt_fee` decimal(7,2) DEFAULT 0.00,
  `bet_hash_fee` decimal(7,2) DEFAULT 0.00,
  `pre_bet_take_s` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_2` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_3` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_4` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_5_more` decimal(11,2) DEFAULT 0.00,
  `real_bet_take_s` decimal(11,2) DEFAULT 0.00,
  `real_bet_take_d` decimal(11,2) DEFAULT 0.00,
  `mini_bet_take` decimal(11,2) DEFAULT 0.00,
  `casino_bet_take` decimal(11,2) DEFAULT 0.00,
  `slot_bet_take` decimal(11,2) DEFAULT 0.00,
  `hash_bet_take` decimal(11,2) DEFAULT 0.00,
  `espt_bet_take` decimal(11,2) DEFAULT 0.00,
  PRIMARY KEY (`member_idx`,`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='총판 정산';

--
-- Table structure for table `shop_config`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `shop_config` (
  `member_idx` int(11) NOT NULL DEFAULT 0 COMMENT '유저번호(매장)',
  `bet_pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치싱글',
  `bet_pre_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치다폴더',
  `bet_pre_d_2_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_3_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_4_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_5_more_fee` decimal(7,2) DEFAULT 0.00,
  `bet_real_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간싱글',
  `bet_real_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간다폴더',
  `bet_mini_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 미니게임',
  `pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 프리매치싱글',
  `bet_casino_fee` decimal(7,2) DEFAULT 0.00,
  `bet_slot_fee` decimal(7,2) DEFAULT 0.00,
  `bet_esports_fee` decimal(7,2) DEFAULT 0.00,
  `bet_hash_fee` decimal(7,2) DEFAULT 0.00,
  PRIMARY KEY (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='매장별 수수료 설정';

--
-- Table structure for table `sms_auth`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `sms_auth` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `phone_number` varchar(45) DEFAULT NULL,
  `auth_number` varchar(45) DEFAULT NULL,
  `create_dt` datetime DEFAULT current_timestamp(),
  `status` int(11) DEFAULT 1 COMMENT '1-요청, 2-인증완료',
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=57374 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `sports_rule`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `sports_rule` (
  `id` int(11) NOT NULL DEFAULT 0 COMMENT '종목번호',
  `betting_type` varchar(32) NOT NULL COMMENT '베팅타입',
  `betting_name` varchar(32) DEFAULT NULL COMMENT '종목명',
  `application_time` varchar(16) NOT NULL COMMENT '적용시간',
  `contents` varchar(8) DEFAULT NULL COMMENT '설명',
  PRIMARY KEY (`id`,`betting_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `sports_rule_2`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `sports_rule_2` (
  `id` int(11) NOT NULL DEFAULT 0 COMMENT '종목번호',
  `type` varchar(16) NOT NULL COMMENT '타입 및 경기시간',
  `contents` varchar(8) DEFAULT NULL COMMENT '설명',
  PRIMARY KEY (`id`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_adm_config`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_adm_config` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a_id` varchar(50) NOT NULL,
  `alarm_name` varchar(50) DEFAULT NULL,
  `alarm_use` enum('Y','N') NOT NULL DEFAULT 'Y',
  `alarm_kind` varchar(50) DEFAULT NULL,
  `alarm_file` varchar(300) DEFAULT NULL,
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_adm_ip`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_adm_ip` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` tinyint(4) DEFAULT 1 COMMENT '1:ipv4, 2:ipv6',
  `a_ip` varchar(30) DEFAULT NULL,
  `a_memo` text DEFAULT NULL,
  `isuse` enum('Y','N') DEFAULT 'Y',
  `reg_time` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  UNIQUE KEY `UQ_t_adm_ip_01` (`a_ip`)
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_adm_log`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_adm_log` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a_id` varchar(50) NOT NULL,
  `a_ip` varchar(30) DEFAULT NULL,
  `a_country` varchar(50) DEFAULT NULL,
  `is_login` enum('Y','N','') DEFAULT NULL,
  `u_id` varchar(50) DEFAULT NULL,
  `u_nick` varchar(50) DEFAULT NULL,
  `log_data` text DEFAULT NULL,
  `log_type` tinyint(3) unsigned DEFAULT 99 COMMENT '1 운영툴 로그인\\\\\\\\\\\\\\\\n2. 관리자 ip관리, 개별 ip 차단관리\\\\\\\\\\\\\\\\n3. 도메인 코드 관리\\\\\\\\\\\\\\\\n4. 레벨별 계좌설정\\\\\\\\\\\\\\\\n5. 가입첫충\\\\\\\\\\\\\\\\n6. 등급별 베팅금액 설정\\\\\\\\\\\\\\\\n7. 사이트 설정\\\\\\\\\\\\\\\\n11. 관리자 아이디 관리\\\\\\\\n20. 전체수동정산  21. 개별수동정산  22. 전체수동적특  23. 개별수동적특  24. 개별마켓ON/OFF  25. 경기ON/OFF  26. 일괄적용  27. 경기상태변경  28. 추천코드 변경  29. 정산요율\\\\\\\\n30. 회원상세-배팅가능  31. 배팅타입관리  32. 리그관리  33. 미니게임on/off  34. 가상축구on/off  35. 이벤트충전 설정  36. 이벤트충전 상태\\\\\\\\n40. 비밀번호  41. 환전비밀번호  42. 닉네임  43. 전화번호  44. 추천  45. 상태  46. 레벨  47. 자동렙업  48. 추천인  49. 계좌정보\\\\\\\\n50. 계좌이름  51. 은행 52: 경기 수동관리 53 : 경기 자동관리 54 : 경기시작시간 변경 ',
  `reg_time` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  KEY `idx_log_type` (`log_type`)
) ENGINE=InnoDB AUTO_INCREMENT=107601 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='관리자 로그';

--
-- Table structure for table `t_adm_user`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_adm_user` (
  `a_id` varchar(50) NOT NULL,
  `a_pw` varchar(200) NOT NULL,
  `a_nick` varchar(100) DEFAULT NULL,
  `a_memo` text DEFAULT NULL,
  `session_key` varchar(100) DEFAULT NULL,
  `last_login` timestamp NULL DEFAULT NULL,
  `a_status` enum('Y','N') DEFAULT 'Y',
  `a_ip` varchar(30) DEFAULT NULL,
  `a_before_ip` varchar(30) DEFAULT NULL,
  `a_reg_id` varchar(30) DEFAULT NULL,
  `a_del_id` varchar(30) DEFAULT NULL,
  `reg_time` timestamp NULL DEFAULT current_timestamp(),
  `is_main_stat` varchar(45) DEFAULT '0' COMMENT '상황판 값을 보여줄지 말지 여부(0-off, 1-on)',
  `grade` tinyint(2) DEFAULT 1 COMMENT '1 : 기본유저 ,2 : 읽기 ',
  PRIMARY KEY (`a_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_domain_code`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_domain_code` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `domain` varchar(100) DEFAULT NULL,
  `domain_code` varchar(100) DEFAULT NULL,
  `is_use` enum('Y','N') DEFAULT 'Y',
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `type` tinyint(4) DEFAULT 1 COMMENT '1-본사, 2-총판, 3-가로',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `UQ_DOMAIN_01` (`domain_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_game_config`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_game_config` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `u_level` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `set_type` varchar(50) NOT NULL,
  `set_type_val` varchar(200) NOT NULL,
  `title` varchar(200) NOT NULL,
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`),
  UNIQUE KEY `UQ_GAME_CONFIG_01` (`u_level`,`set_type`) USING BTREE,
  KEY `idx_type` (`set_type`)
) ENGINE=InnoDB AUTO_INCREMENT=267 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_ip_country`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_ip_country` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `country_code` varchar(10) DEFAULT NULL,
  `country` varchar(50) DEFAULT NULL,
  `ip_start` int(10) unsigned NOT NULL,
  `ip_end` int(10) unsigned NOT NULL,
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=190352 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_log_cash`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_log_cash` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `u_key` varchar(64) DEFAULT NULL,
  `member_idx` int(11) NOT NULL,
  `ac_code` smallint(6) DEFAULT 0 COMMENT '    /*1:충전,2:환전,3:베팅,4:베팅취소,5:포인트전환(추가),6:포인트차감,7:베팅결과처리,8:이벤트충전,9:이벤트차감,10:포인트충전,11 : 낙첨 포인트 지급,101:충전요청,102:환전요청,103:계좌조회,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n             * 111:충전요청취소,112:환전요청취소,113:충전취소,114:환전취소,121:관리자충전,122:관리자회수,123:관리자 포인트 충전, 124:관리자 포인트 회수,125 : 관리자 환전 회수,998:데이터복구,999:기타 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n     \\\\\\\\n201 : 정산 취소,202 : 정산 포인트 취소,203 : 정산 추천인 포인트 취소  ,126 : 재정산으로 인한 정산 ->적특시 이미 지급된 포인트 관리자 회수\\n,127 : 재정산으로 인한 적특 ->정산 시 지급으로 인한 관리자포인트 충전  */',
  `ac_idx` int(11) DEFAULT NULL,
  `r_money` decimal(10,2) NOT NULL DEFAULT 0.00,
  `be_r_money` decimal(11,2) NOT NULL DEFAULT 0.00,
  `af_r_money` decimal(11,2) NOT NULL DEFAULT 0.00,
  `point` int(11) NOT NULL DEFAULT 0,
  `be_point` int(11) NOT NULL DEFAULT 0,
  `af_point` int(11) NOT NULL DEFAULT 0,
  `m_kind` enum('R','P','M') NOT NULL DEFAULT 'R',
  `title_kind` varchar(30) DEFAULT NULL,
  `coment` text DEFAULT NULL,
  `u_ip` varchar(30) DEFAULT NULL,
  `a_id` varchar(30) DEFAULT NULL,
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `charge_total_count` int(11) DEFAULT 0,
  `loock_up_total_count` int(11) DEFAULT 0,
  `charge_total_money` int(11) DEFAULT 0,
  `g_money` int(11) DEFAULT 0,
  PRIMARY KEY (`idx`) USING BTREE,
  KEY `ac_code` (`ac_code`),
  KEY `member_idx` (`member_idx`),
  KEY `reg_time` (`reg_time`)
) ENGINE=InnoDB AUTO_INCREMENT=5428398 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_log_cash_backup`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_log_cash_backup` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `u_key` varchar(64) DEFAULT NULL,
  `member_idx` int(11) NOT NULL,
  `ac_code` smallint(6) DEFAULT 0 COMMENT '    /*1:충전,2:환전,3:베팅,4:베팅취소,5:포인트전환(추가),6:포인트차감,7:베팅결과처리,8:이벤트충전,9:이벤트차감,10:포인트충전,11 : 낙첨 포인트 지급,101:충전요청,102:환전요청,103:계좌조회,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n             * 111:충전요청취소,112:환전요청취소,113:충전취소,114:환전취소,121:관리자충전,122:관리자회수,123:관리자 포인트 충전, 124:관리자 포인트 회수,125 : 관리자 환전 회수,998:데이터복구,999:기타 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n     \\\\\\\\n201 : 정산 취소,202 : 정산 포인트 취소,203 : 정산 추천인 포인트 취소  ,126 : 재정산으로 인한 정산 ->적특시 이미 지급된 포인트 관리자 회수\\n,127 : 재정산으로 인한 적특 ->정산 시 지급으로 인한 관리자포인트 충전  */',
  `ac_idx` int(11) DEFAULT NULL,
  `r_money` int(11) NOT NULL DEFAULT 0,
  `be_r_money` int(11) NOT NULL DEFAULT 0,
  `af_r_money` int(11) NOT NULL DEFAULT 0,
  `point` int(11) NOT NULL DEFAULT 0,
  `be_point` int(11) NOT NULL DEFAULT 0,
  `af_point` int(11) NOT NULL DEFAULT 0,
  `m_kind` enum('R','P','M') NOT NULL DEFAULT 'R',
  `title_kind` varchar(30) DEFAULT NULL,
  `coment` text DEFAULT NULL,
  `u_ip` varchar(30) DEFAULT NULL,
  `a_id` varchar(30) DEFAULT NULL,
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `charge_total_count` int(11) DEFAULT 0,
  `loock_up_total_count` int(11) DEFAULT 0,
  `charge_total_money` int(11) DEFAULT 0,
  PRIMARY KEY (`idx`) USING BTREE,
  KEY `ac_code` (`ac_code`),
  KEY `member_idx` (`member_idx`),
  KEY `reg_time` (`reg_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_member_memo`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_member_memo` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `member_idx` int(10) unsigned NOT NULL DEFAULT 0,
  `m_type` tinyint(4) NOT NULL DEFAULT 1,
  `content` varchar(300) DEFAULT NULL,
  `a_id` varchar(50) DEFAULT NULL,
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6886 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_message`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_message` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `msg_idx` int(10) unsigned NOT NULL,
  `member_idx` int(10) unsigned NOT NULL,
  `read_yn` enum('Y','N') NOT NULL DEFAULT 'N',
  `u_ip` varchar(30) DEFAULT NULL,
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  `read_time` datetime DEFAULT NULL,
  `is_delete` int(10) DEFAULT 0,
  PRIMARY KEY (`idx`),
  KEY `idx_mb_idx` (`member_idx`)
) ENGINE=InnoDB AUTO_INCREMENT=412285 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `t_message_list`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_message_list` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `idx_key` char(25) NOT NULL,
  `title` varchar(200) NOT NULL,
  `content` longtext NOT NULL,
  `a_id` varchar(50) DEFAULT NULL,
  `a_view_nick` varchar(100) DEFAULT NULL,
  `w_type` enum('A','H') NOT NULL DEFAULT 'H',
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '등록일',
  PRIMARY KEY (`idx`) USING BTREE,
  UNIQUE KEY `UQ_MESSAGE_LIST_U01` (`idx_key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=14937 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `t_message_set`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `t_message_set` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `a_id` varchar(50) NOT NULL,
  `title_view` varchar(200) NOT NULL,
  `title` varchar(200) NOT NULL,
  `content` text NOT NULL,
  `use_kind` enum('Y','N') NOT NULL DEFAULT 'N',
  `send_cnt` int(10) unsigned NOT NULL DEFAULT 0,
  `reg_time` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `tb_static_bonus`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_static_bonus` (
  `idx` int(11) NOT NULL DEFAULT 0,
  `desc` varchar(128) DEFAULT '',
  `flag` enum('ON','OFF') DEFAULT 'ON',
  `bonus_1_desc` varchar(128) DEFAULT '',
  `bonus_1_flag` enum('ON','OFF') DEFAULT 'ON',
  `bonus_2_desc` varchar(128) DEFAULT '',
  `bonus_2_flag` enum('ON','OFF') DEFAULT 'ON',
  `create_dt` datetime DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='보너스 포인트 관리 테이블 ';

--
-- Table structure for table `tb_user_pay_back_info`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_user_pay_back_info` (
  `member_idx` int(11) NOT NULL DEFAULT 0,
  `charge` int(11) DEFAULT 0,
  `exchange` int(11) DEFAULT 0,
  `tot_bet_money` int(11) DEFAULT 0,
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `create_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `temp` (
  `member_idx` int(11) NOT NULL,
  `take_money` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_2_shop_calculate_result`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `temp_2_shop_calculate_result` (
  `member_idx` int(11) NOT NULL DEFAULT 0 COMMENT '유저번호(매장)',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp() COMMENT '지급한 날짜',
  `calculate_dt` datetime DEFAULT NULL COMMENT '정산에 사용한 데이터의 날짜',
  `calculate_point` decimal(11,2) DEFAULT 0.00 COMMENT '정산금',
  `be_point` int(11) DEFAULT 0,
  `af_point` int(11) DEFAULT 0,
  `ch_val` decimal(11,2) DEFAULT 0.00 COMMENT '입금',
  `ex_val` decimal(11,2) DEFAULT 0.00 COMMENT '출금',
  `pre_bet_sum_s` decimal(11,2) DEFAULT 0.00 COMMENT '프리싱글 정산금',
  `pre_bet_sum_d` decimal(11,2) DEFAULT 0.00 COMMENT '프리멀티 정산금',
  `pre_bet_sum_d_2` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_3` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_4` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_5_more` decimal(11,2) DEFAULT 0.00,
  `real_bet_sum_s` decimal(11,2) DEFAULT 0.00 COMMENT '실시간싱글 정산금',
  `real_bet_sum_d` decimal(11,2) DEFAULT 0.00 COMMENT '실시간멀티 정산금',
  `mini_bet_sum` decimal(11,2) DEFAULT 0.00 COMMENT '미니게임 정산금',
  `total_casino_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_slot_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_hash_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_espt_bet_money` decimal(11,2) DEFAULT 0.00,
  `bet_pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치싱글 수수료',
  `bet_pre_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치다폴더 수수료',
  `bet_pre_d_2_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_3_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_4_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_5_more_fee` decimal(7,2) DEFAULT 0.00,
  `bet_real_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간싱글 수수료',
  `bet_real_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간다폴더 수수료',
  `bet_mini_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 미니게임 수수료',
  `pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 수수료',
  `bet_casino_fee` decimal(7,2) DEFAULT 0.00,
  `bet_slot_fee` decimal(7,2) DEFAULT 0.00,
  `bet_espt_fee` decimal(7,2) DEFAULT 0.00,
  `bet_hash_fee` decimal(7,2) DEFAULT 0.00,
  `pre_bet_take_s` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_2` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_3` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_4` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_5_more` decimal(11,2) DEFAULT 0.00,
  `real_bet_take_s` decimal(11,2) DEFAULT 0.00,
  `real_bet_take_d` decimal(11,2) DEFAULT 0.00,
  `mini_bet_take` decimal(11,2) DEFAULT 0.00,
  `casino_bet_take` decimal(11,2) DEFAULT 0.00,
  `slot_bet_take` decimal(11,2) DEFAULT 0.00,
  `hash_bet_take` decimal(11,2) DEFAULT 0.00,
  `espt_bet_take` decimal(11,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_account_info`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `temp_account_info` (
  `id` varchar(45) NOT NULL DEFAULT '',
  `account_number` varchar(45) DEFAULT '',
  `account_name` varchar(45) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_level_up`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `temp_level_up` (
  `day` date NOT NULL DEFAULT current_timestamp(),
  `member_idx` int(11) NOT NULL DEFAULT 0,
  `bf_level` int(11) DEFAULT 0,
  `level` int(11) DEFAULT 0,
  `v_today_total_ch_money` int(11) DEFAULT 0,
  `v_today_total_ex_money` int(11) DEFAULT 0,
  `v_today_total_bet_money` int(11) DEFAULT 0,
  `v_today_total_ch_ex_money_difference` int(11) DEFAULT 0,
  `v_today_total_ch_count` int(11) DEFAULT 0,
  `v_nonDepositDatePeriod` int(11) DEFAULT 0,
  `r_charge_total_money` int(11) DEFAULT 0,
  `r_exchange_total_money` int(11) DEFAULT 0,
  `r_charge_total_count` int(11) DEFAULT 0,
  `r_calcurator` int(11) DEFAULT 0,
  PRIMARY KEY (`day`,`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_member`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `temp_member` (
  `id` varchar(20) NOT NULL,
  `nick` varchar(20) DEFAULT NULL,
  `level` int(11) DEFAULT NULL,
  `account_bank` varchar(20) DEFAULT NULL,
  `account_number` varchar(20) DEFAULT NULL,
  `account_name` varchar(20) DEFAULT NULL,
  `hp` varchar(20) DEFAULT NULL,
  `memo` varchar(2048) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_pay_back`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `temp_pay_back` (
  `member_idx` int(11) DEFAULT 0,
  `charge` int(11) DEFAULT 0,
  `exchange` int(11) DEFAULT 0,
  `total_value` bigint(12) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `temp_shop_calculate_result`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `temp_shop_calculate_result` (
  `member_idx` int(11) NOT NULL DEFAULT 0 COMMENT '유저번호(매장)',
  `create_dt` datetime NOT NULL DEFAULT current_timestamp() COMMENT '지급한 날짜',
  `calculate_dt` datetime DEFAULT NULL COMMENT '정산에 사용한 데이터의 날짜',
  `calculate_point` decimal(11,2) DEFAULT 0.00 COMMENT '정산금',
  `be_point` int(11) DEFAULT 0,
  `af_point` int(11) DEFAULT 0,
  `ch_val` decimal(11,2) DEFAULT 0.00 COMMENT '입금',
  `ex_val` decimal(11,2) DEFAULT 0.00 COMMENT '출금',
  `pre_bet_sum_s` decimal(11,2) DEFAULT 0.00 COMMENT '프리싱글 정산금',
  `pre_bet_sum_d` decimal(11,2) DEFAULT 0.00 COMMENT '프리멀티 정산금',
  `pre_bet_sum_d_2` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_3` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_4` decimal(11,2) DEFAULT 0.00,
  `pre_bet_sum_d_5_more` decimal(11,2) DEFAULT 0.00,
  `real_bet_sum_s` decimal(11,2) DEFAULT 0.00 COMMENT '실시간싱글 정산금',
  `real_bet_sum_d` decimal(11,2) DEFAULT 0.00 COMMENT '실시간멀티 정산금',
  `mini_bet_sum` decimal(11,2) DEFAULT 0.00 COMMENT '미니게임 정산금',
  `total_casino_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_slot_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_hash_bet_money` decimal(11,2) DEFAULT 0.00,
  `total_espt_bet_money` decimal(11,2) DEFAULT 0.00,
  `bet_pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치싱글 수수료',
  `bet_pre_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 프리매치다폴더 수수료',
  `bet_pre_d_2_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_3_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_4_fee` decimal(7,2) DEFAULT 0.00,
  `bet_pre_d_5_more_fee` decimal(7,2) DEFAULT 0.00,
  `bet_real_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간싱글 수수료',
  `bet_real_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 실시간다폴더 수수료',
  `bet_mini_fee` decimal(7,2) DEFAULT 0.00 COMMENT '베팅롤링 미니게임 수수료',
  `pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 수수료',
  `bet_casino_fee` decimal(7,2) DEFAULT 0.00,
  `bet_slot_fee` decimal(7,2) DEFAULT 0.00,
  `bet_espt_fee` decimal(7,2) DEFAULT 0.00,
  `bet_hash_fee` decimal(7,2) DEFAULT 0.00,
  `pre_bet_take_s` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_2` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_3` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_4` decimal(11,2) DEFAULT 0.00,
  `pre_bet_take_d_5_more` decimal(11,2) DEFAULT 0.00,
  `real_bet_take_s` decimal(11,2) DEFAULT 0.00,
  `real_bet_take_d` decimal(11,2) DEFAULT 0.00,
  `mini_bet_take` decimal(11,2) DEFAULT 0.00,
  `casino_bet_take` decimal(11,2) DEFAULT 0.00,
  `slot_bet_take` decimal(11,2) DEFAULT 0.00,
  `hash_bet_take` decimal(11,2) DEFAULT 0.00,
  `espt_bet_take` decimal(11,2) DEFAULT 0.00,
  PRIMARY KEY (`member_idx`,`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='총판 정산';

--
-- Table structure for table `template`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `template` (
  `idx` int(11) NOT NULL AUTO_INCREMENT,
  `type` int(11) NOT NULL COMMENT '0-쪽지, 1-답변',
  `division` varchar(128) DEFAULT NULL COMMENT '분류',
  `title` text DEFAULT NULL COMMENT '내용',
  `content` text DEFAULT NULL,
  `update_dt` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `total_member_cash`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `total_member_cash` (
  `member_idx` int(11) NOT NULL DEFAULT 0,
  `charge_total_count` int(11) NOT NULL DEFAULT 0 COMMENT '충전횟수',
  `charge_total_money` bigint(20) NOT NULL DEFAULT 0 COMMENT '조회횟수',
  `exchange_total_count` int(11) NOT NULL DEFAULT 0 COMMENT '충전금액',
  `exchange_total_money` bigint(20) DEFAULT 0,
  `max_charge` bigint(20) DEFAULT 0,
  `bf_max_charge` bigint(20) DEFAULT 0,
  `max_exchange` bigint(20) DEFAULT 0,
  `bf_max_exchange` bigint(20) DEFAULT 0,
  `loock_up_total_count` int(11) DEFAULT 0 COMMENT '계좌 조회 카운트',
  `bet_total_count` int(11) DEFAULT 0,
  `bet_total_money` bigint(20) DEFAULT 0,
  `pre_s_total_money` bigint(20) DEFAULT 0,
  `pre_m_total_money` bigint(20) DEFAULT 0,
  `real_s_total_money` bigint(20) DEFAULT 0,
  `real_m_total_money` bigint(20) DEFAULT 0,
  `mini_total_money` bigint(20) DEFAULT 0,
  `casino_total_money` bigint(20) DEFAULT 0,
  `slot_total_money` bigint(20) DEFAULT 0,
  `take_total_money` bigint(20) DEFAULT 0,
  `take_slot_total_money` bigint(20) DEFAULT 0,
  `take_casino_total_money` bigint(20) DEFAULT 0,
  `take_mini_total_money` bigint(20) DEFAULT 0,
  `take_real_m_total_money` bigint(20) DEFAULT 0,
  `take_real_s_total_money` bigint(20) DEFAULT 0,
  `take_pre_m_total_money` bigint(20) DEFAULT 0,
  `take_pre_s_total_money` bigint(20) DEFAULT 0,
  `update_dt` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  `espt_total_money` bigint(20) DEFAULT 0,
  `take_espt_total_money` bigint(20) DEFAULT 0,
  `hash_total_money` bigint(20) DEFAULT 0,
  `take_hash_total_money` bigint(20) DEFAULT 0,
  PRIMARY KEY (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `total_system`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `total_system` (
  `current_count` int(11) NOT NULL DEFAULT 0,
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`current_count`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='집계용 테이블';

--
-- Table structure for table `virtual_goods_list`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `virtual_goods_list` (
  `p_seq` int(11) NOT NULL DEFAULT 0 COMMENT '상품등록 코드',
  `p_name` varchar(32) DEFAULT NULL COMMENT '종목명',
  `p_price` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '마감시간',
  `p_sell_state` varchar(32) DEFAULT NULL COMMENT '상품 판매 상태 (SELL:판매중, SOLDOUT:판매완료)',
  PRIMARY KEY (`p_seq`),
  KEY `idx_p_price` (`p_price`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Table structure for table `x_shop_config_request`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `x_shop_config_request` (
  `member_idx` int(11) NOT NULL DEFAULT 0 COMMENT '유저번호(매장)',
  `bet_pre_s_fee` decimal(7,2) DEFAULT NULL COMMENT '베팅롤링 프리매치싱글',
  `bet_pre_d_fee` int(11) DEFAULT NULL COMMENT '베팅롤링 프리매치다폴더',
  `bet_real_s_fee` int(11) DEFAULT 0 COMMENT '베팅롤링 실시간싱글',
  `bet_real_d_fee` int(11) DEFAULT 0 COMMENT '베팅롤링 실시간다폴더',
  `bet_mini_fee` int(11) DEFAULT 0 COMMENT '베팅롤링 미니게임',
  `total_casino_bet_money` int(11) DEFAULT 0,
  `total_slot_bet_money` int(11) DEFAULT 0,
  `pre_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 프리매치싱글',
  `pre_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 프리매치다폴더',
  `real_s_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 실시간싱글',
  `real_d_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 실시간다폴더',
  `mini_fee` decimal(7,2) DEFAULT 0.00 COMMENT '죽장 미니게임',
  `bet_casino_fee` decimal(7,2) DEFAULT 0.00,
  `bet_slot_fee` decimal(7,2) DEFAULT 0.00,
  `is_process` int(11) DEFAULT 0 COMMENT '0-처리됨, 1-처리필요',
  PRIMARY KEY (`member_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='매장별 수수료 변경요청';

--
-- Table structure for table `x_total_day_cash`
--

 SET character_set_client = utf8mb4 ;
CREATE TABLE `x_total_day_cash` (
  `day_dt` date NOT NULL DEFAULT current_timestamp(),
  `member_idx` int(11) NOT NULL DEFAULT 0,
  `charge_total_money` bigint(20) NOT NULL DEFAULT 0 COMMENT '조회횟수',
  `exchange_total_money` bigint(20) DEFAULT 0,
  `pre_total_money` bigint(20) DEFAULT 0,
  `ing_pre_total_money` bigint(20) DEFAULT 0,
  `take_pre_total_money` bigint(20) DEFAULT 0,
  `real_total_money` bigint(20) DEFAULT 0,
  `ing_real_total_money` bigint(20) DEFAULT 0,
  `take_real_total_money` bigint(20) DEFAULT 0,
  `pb_total_money` bigint(20) DEFAULT 0,
  `take_pb_total_money` bigint(20) DEFAULT 0,
  `p_ladder_total_money` bigint(20) DEFAULT 0,
  `take_p_ladder_total_money` bigint(20) DEFAULT 0,
  `k_ladder_total_money` bigint(20) DEFAULT 0,
  `take_k_ladder_total_money` bigint(20) DEFAULT 0,
  `v_soccer_total_money` bigint(20) DEFAULT 0,
  `take_v_soccer_total_money` bigint(20) DEFAULT 0,
  `casino_total_money` bigint(20) DEFAULT 0,
  `take_casino_total_money` bigint(20) DEFAULT 0,
  `slot_total_money` bigint(20) DEFAULT 0,
  `take_slot_total_money` bigint(20) DEFAULT 0,
  `update_dt` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `create_dt` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`day_dt`,`member_idx`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Final view structure for view `day_bet_mini`
--

/*!50001 DROP VIEW IF EXISTS `day_bet_mini`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`kadminwin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `day_bet_mini` AS select 'bet_tot_mini_powerball' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`total_bet_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 3 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`member`.`level` <> 9 and `mydb_gamble`.`mini_game_member_bet`.`total_bet_money` <> `mydb_gamble`.`mini_game_member_bet`.`take_money` union all select 'bet_tot_mini_powerball_win' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`take_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 3 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`mini_game_member_bet`.`take_money` > 0 and `mydb_gamble`.`member`.`level` <> 9 union all select 'bet_tot_mini_pladder' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`total_bet_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 4 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`member`.`level` <> 9 and `mydb_gamble`.`mini_game_member_bet`.`total_bet_money` <> `mydb_gamble`.`mini_game_member_bet`.`take_money` union all select 'bet_tot_mini_pladder_win' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`take_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 4 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`mini_game_member_bet`.`take_money` > 0 and `mydb_gamble`.`member`.`level` <> 9 union all select 'bet_tot_mini_kladder' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`total_bet_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 5 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`member`.`level` <> 9 and `mydb_gamble`.`mini_game_member_bet`.`total_bet_money` <> `mydb_gamble`.`mini_game_member_bet`.`take_money` union all select 'bet_tot_mini_kladder_win' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`take_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 5 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`mini_game_member_bet`.`take_money` > 0 and `mydb_gamble`.`member`.`level` <> 9 union all select 'bet_tot_mini_b_soccer' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`total_bet_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 6 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`member`.`level` <> 9 and `mydb_gamble`.`mini_game_member_bet`.`total_bet_money` <> `mydb_gamble`.`mini_game_member_bet`.`take_money` union all select 'bet_tot_mini_b_soccer_win' AS `stype`,sum(`mydb_gamble`.`mini_game_member_bet`.`take_money`) AS `s_money` from (`mini_game_member_bet` left join `member` on(`mydb_gamble`.`mini_game_member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`mini_game_member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`mini_game_member_bet`.`bet_type` = 6 and `mydb_gamble`.`mini_game_member_bet`.`bet_status` = 3 and `mydb_gamble`.`mini_game_member_bet`.`take_money` > 0 and `mydb_gamble`.`member`.`level` <> 9 */;

--
-- Final view structure for view `day_bet_pre`
--

/*!50001 DROP VIEW IF EXISTS `day_bet_pre`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`kadminwin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `day_bet_pre` AS select 'bet_tot_ing' AS `stype`,`mydb_gamble`.`member_bet`.`bet_status` AS `status`,count(0) AS `cnt`,sum(`mydb_gamble`.`member_bet`.`total_bet_money`) AS `s_money`,0 AS `s_win_money` from (`member_bet` left join `member` on(`mydb_gamble`.`member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`member_bet`.`bet_type` = 1 and `mydb_gamble`.`member_bet`.`bet_status` = 1 and `mydb_gamble`.`member`.`level` <> 9 union all select 'bet_tot' AS `stype`,`mydb_gamble`.`member_bet`.`bet_status` AS `status`,count(0) AS `cnt`,`mydb_gamble`.`member_bet`.`total_bet_money` AS `s_money`,`mydb_gamble`.`member_bet`.`take_money` AS `s_win_money` from (`member_bet` left join `member` on(`mydb_gamble`.`member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member_bet`.`bet_type` = 1 and `mydb_gamble`.`member_bet`.`bet_status` = 3 and `mydb_gamble`.`member`.`level` <> 9 and `mydb_gamble`.`member_bet`.`total_bet_money` <> `mydb_gamble`.`member_bet`.`take_money` group by `mydb_gamble`.`member_bet`.`idx` union all select 'bet_tot_sports' AS `stype`,`mydb_gamble`.`member_bet`.`bet_status` AS `status`,count(0) AS `cnt`,`mydb_gamble`.`member_bet`.`total_bet_money` AS `s_money`,sum(`mydb_gamble`.`member_bet`.`take_money`) AS `s_win_money` from (`member_bet` left join `member` on(`mydb_gamble`.`member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member_bet`.`bet_type` = 1 and `mydb_gamble`.`member_bet`.`bet_status` = 3 and `mydb_gamble`.`member_bet`.`total_bet_money` <> `mydb_gamble`.`member_bet`.`take_money` and `mydb_gamble`.`member`.`level` <> 9 */;

--
-- Final view structure for view `day_bet_real`
--

/*!50001 DROP VIEW IF EXISTS `day_bet_real`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`kadminwin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `day_bet_real` AS select 'bet_tot_ing' AS `stype`,`mydb_gamble`.`member_bet`.`bet_status` AS `status`,count(0) AS `cnt`,sum(`mydb_gamble`.`member_bet`.`total_bet_money`) AS `s_money`,0 AS `s_win_money` from (`member_bet` left join `member` on(`mydb_gamble`.`member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`member_bet`.`bet_type` = 2 and `mydb_gamble`.`member_bet`.`bet_status` = 1 and `mydb_gamble`.`member`.`level` <> 9 union all select 'bet_tot' AS `stype`,`mydb_gamble`.`member_bet`.`bet_status` AS `status`,count(0) AS `cnt`,`mydb_gamble`.`member_bet`.`total_bet_money` AS `s_money`,`mydb_gamble`.`member_bet`.`take_money` AS `s_win_money` from (`member_bet` left join `member` on(`mydb_gamble`.`member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member_bet`.`bet_type` = 2 and `mydb_gamble`.`member_bet`.`bet_status` = 3 and `mydb_gamble`.`member`.`level` <> 9 and `mydb_gamble`.`member_bet`.`total_bet_money` <> `mydb_gamble`.`member_bet`.`take_money` group by `mydb_gamble`.`member_bet`.`u_key` union all select 'bet_tot_real' AS `stype`,`mydb_gamble`.`member_bet`.`bet_status` AS `status`,count(0) AS `cnt`,`mydb_gamble`.`member_bet`.`total_bet_money` AS `s_money`,sum(`mydb_gamble`.`member_bet`.`take_money`) AS `s_win_money` from (`member_bet` left join `member` on(`mydb_gamble`.`member_bet`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mydb_gamble`.`member_bet`.`calculate_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member_bet`.`calculate_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member_bet`.`bet_type` = 2 and `mydb_gamble`.`member_bet`.`bet_status` = 3 and `mydb_gamble`.`member_bet`.`total_bet_money` <> `mydb_gamble`.`member_bet`.`take_money` and `mydb_gamble`.`member`.`level` <> 9 */;

--
-- Final view structure for view `day_casino_slot_view`
--

/*!50001 DROP VIEW IF EXISTS `day_casino_slot_view`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`kadminwin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `day_casino_slot_view` AS select 'bet_tot_casino' AS `stype`,ifnull(sum(`CBH`.`BET_MNY`),0) AS `total_bet_money`,ifnull(sum(case when `CBH`.`TYPE` = 'W' then `CBH`.`BET_MNY` + `CBH`.`RSLT_MNY` end),0) AS `total_win_money`,ifnull(sum(case when `CBH`.`TYPE` = 'B' then `CBH`.`BET_MNY` end),0) AS `total_ing_bet_money` from (`member` `MB` left join `KP_CSN_BET_HIST` `CBH` on(`MB`.`idx` = `CBH`.`MBR_IDX`)) where `CBH`.`MOD_DTM` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `CBH`.`MOD_DTM` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `MB`.`level` <> 9 and `MB`.`u_business` = 1 and `CBH`.`TYPE` in ('W','L') union all select 'bet_tot_slot' AS `stype`,ifnull(sum(`CBH`.`BET_MNY`),0) AS `total_bet_money`,ifnull(sum(case when `CBH`.`TYPE` = 'W' then `CBH`.`BET_MNY` + `CBH`.`RSLT_MNY` end),0) AS `total_win_money`,ifnull(sum(case when `CBH`.`TYPE` = 'B' then `CBH`.`BET_MNY` end),0) AS `total_ing_bet_money` from (`member` `MB` left join `KP_SLOT_BET_HIST` `CBH` on(`MB`.`idx` = `CBH`.`MBR_IDX`)) where `CBH`.`MOD_DTM` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `CBH`.`MOD_DTM` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `MB`.`level` <> 9 and `MB`.`u_business` = 1 and `CBH`.`TYPE` in ('W','L') */;

--
-- Final view structure for view `day_ch_ex`
--

/*!50001 DROP VIEW IF EXISTS `day_ch_ex`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`kadminwin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `day_ch_ex` AS select 'ch' AS `stype`,`mch`.`status` AS `status`,count(0) AS `cnt`,sum(`mch`.`money`) AS `s_money` from (`member_money_charge_history` `mch` left join `member` on(`mch`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mch`.`update_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mch`.`update_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member`.`level` <> 9 group by `mch`.`status` union all select 'ex' AS `stype`,`meh`.`status` AS `status`,count(0) AS `cnt`,sum(`meh`.`money`) AS `s_money` from (`member_money_exchange_history` `meh` left join `member` on(`meh`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where cast(`meh`.`update_dt` as date) >= cast(current_timestamp() as date) and `mydb_gamble`.`member`.`level` <> 9 group by `meh`.`status` union all select 'ch_tot' AS `stype`,`mch`.`status` AS `status`,count(0) AS `cnt`,sum(`mch`.`money`) AS `s_money` from (`member_money_charge_history` `mch` left join `member` on(`mch`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `mch`.`update_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mch`.`update_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member`.`level` <> 9 group by `mch`.`status` union all select 'ex_tot' AS `stype`,`meh`.`status` AS `status`,count(0) AS `cnt`,sum(`meh`.`money`) AS `s_money` from (`member_money_exchange_history` `meh` left join `member` on(`meh`.`member_idx` = `mydb_gamble`.`member`.`idx`)) where `meh`.`update_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `meh`.`update_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member`.`level` <> 9 group by `meh`.`status` */;

--
-- Final view structure for view `day_espt_hash_view`
--

/*!50001 DROP VIEW IF EXISTS `day_espt_hash_view`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`kadminwin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `day_espt_hash_view` AS select 'bet_tot_espt' AS `stype`,ifnull(sum(`CBH`.`BET_MNY`),0) AS `total_bet_money`,ifnull(sum(case when `CBH`.`TYPE` = 'W' then `CBH`.`BET_MNY` + `CBH`.`RSLT_MNY` end),0) AS `total_win_money`,ifnull(sum(case when `CBH`.`TYPE` = 'B' then `CBH`.`BET_MNY` end),0) AS `total_ing_bet_money` from (`member` `MB` left join `KP_ESPT_BET_HIST` `CBH` on(`MB`.`idx` = `CBH`.`MBR_IDX`)) where `CBH`.`MOD_DTM` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `CBH`.`MOD_DTM` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `MB`.`level` <> 9 and `MB`.`u_business` = 1 and `CBH`.`TYPE` in ('W','L') union all select 'bet_tot_hash' AS `stype`,ifnull(sum(`CBH`.`BET_MNY`),0) AS `total_bet_money`,ifnull(sum(case when `CBH`.`TYPE` = 'W' then `CBH`.`BET_MNY` + `CBH`.`RSLT_MNY` end),0) AS `total_win_money`,ifnull(sum(case when `CBH`.`TYPE` = 'B' then `CBH`.`BET_MNY` end),0) AS `total_ing_bet_money` from (`member` `MB` left join `OD_HASH_BET_HIST` `CBH` on(`MB`.`idx` = `CBH`.`MBR_IDX`)) where `CBH`.`MOD_DTM` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `CBH`.`MOD_DTM` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `MB`.`level` <> 9 and `MB`.`u_business` = 1 and `CBH`.`TYPE` in ('W','L') */;

--
-- Final view structure for view `day_now_call_check`
--

/*!50001 DROP VIEW IF EXISTS `day_now_call_check`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`kadminwin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `day_now_call_check` AS select 'mem' AS `stype`,`mydb_gamble`.`member`.`status` AS `status`,count(0) AS `cnt`,'0' AS `s_money` from `member` where `mydb_gamble`.`member`.`reg_time` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member`.`reg_time` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member`.`status` in (1,11) group by `mydb_gamble`.`member`.`status` union all select 'mem_leave' AS `stype`,`mydb_gamble`.`member`.`status` AS `status`,count(0) AS `cnt`,'0' AS `s_money` from `member` where `mydb_gamble`.`member`.`leave_time` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member`.`leave_time` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member`.`status` = 3 union all select 'mem_sound' AS `stype`,`mydb_gamble`.`member`.`status` AS `status`,count(0) AS `cnt`,'0' AS `s_money` from `member` where `mydb_gamble`.`member`.`reg_time` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member`.`reg_time` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member`.`is_sound` = 'Y' and `mydb_gamble`.`member`.`status` = 11 union all select 'sms_cnt' AS `stype`,`mydb_gamble`.`member_money_charge_sms`.`status` AS `status`,count(0) AS `cnt`,'0' AS `s_money` from `member_money_charge_sms` where `mydb_gamble`.`member_money_charge_sms`.`create_dt` >= date_format(current_timestamp(),'%Y-%m-%d 00:00:00') and `mydb_gamble`.`member_money_charge_sms`.`create_dt` <= date_format(current_timestamp(),'%Y-%m-%d 23:59:59') and `mydb_gamble`.`member_money_charge_sms`.`status` = 1 */;


