마수현
Committed by Ma Suhyeon

Update readme.md

Showing 1 changed file with 56 additions and 6 deletions
...@@ -10,11 +10,13 @@ LINE 메신저 봇 ID(@149wlczg)를 통해서 사용해 볼 수 있고 아래의 ...@@ -10,11 +10,13 @@ LINE 메신저 봇 ID(@149wlczg)를 통해서 사용해 볼 수 있고 아래의
10 ## Database 초기화 10 ## Database 초기화
11 다음 SQL문을 실행해 데이터베이스의 테이블을 초기화해줍니다. 11 다음 SQL문을 실행해 데이터베이스의 테이블을 초기화해줍니다.
12 ```sql 12 ```sql
13 -CREATE TABLE `items` ( 13 +CREATE TABLE `character_aliases` (
14 - `id` int(11) NOT NULL, 14 + `alias` varchar(32) NOT NULL,
15 - `name` varchar(32) DEFAULT NULL, 15 + `character_id` varchar(32) DEFAULT NULL,
16 - PRIMARY KEY (`id`) 16 + `is_name` tinyint(1) NOT NULL DEFAULT 0,
17 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 17 + PRIMARY KEY (`alias`)
18 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
19 +INSERT INTO `character_aliases` VALUES ('가렌','TFT4_Garen',1),('나미','TFT4_Nami',1),('누누','TFT4_Nunu',0),('누누와 윌럼프','TFT4_Nunu',1),('누누와윌럼프','TFT4_Nunu',0),('니달리','TFT4_Nidalee',1),('다이애나','TFT4_Diana',1),('럭스','TFT4_Lux',1),('룰루','TFT4_Lulu',1),('리 신','TFT4_LeeSin',1),('리븐','TFT4_Riven',1),('리산드라','TFT4_Lissandra',1),('리신','TFT4_LeeSin',0),('릴리아','TFT4_Lillia',1),('마오카이','TFT4_Maokai',1),('모르가나','TFT4_Morgana',1),('바이','TFT4_Vi',1),('베이가','TFT4_Veigar',1),('베인','TFT4_Vayne',1),('사일러스','TFT4_Sylas',1),('세주아니','TFT4_Sejuani',1),('세트','TFT4_Sett',1),('쉔','TFT4_Shen',1),('신짜오','TFT4_XinZhao',1),('쓰레쉬','TFT4_Thresh',1),('아리','TFT4_Ahri',1),('아지르','TFT4_Azir',1),('아칼리','TFT4_Akali',1),('아트록스','TFT4_Aatrox',1),('아펠리오스','TFT4_Aphelios',1),('애니','TFT4_Annie',1),('애쉬','TFT4_Ashe',1),('야스오','TFT4_Yasuo',1),('엘리스','TFT4_Elise',1),('오공','TFT4_Wukong',1),('요네','TFT4_Yone',1),('워윅','TFT4_Warwick',1),('유미','TFT4_Yuumi',1),('이렐리아','TFT4_Irelia',1),('이블린','TFT4_Evelynn',1),('이즈리얼','TFT4_Ezreal',1),('자르반','TFT4_JarvanIV',0),('자르반 4세','TFT4_JarvanIV',1),('자르반4세','TFT4_JarvanIV',0),('잔나','TFT4_Janna',1),('잭스','TFT4_Jax',1),('제드','TFT4_Zed',1),('진','TFT4_Jhin',1),('질리언','TFT4_Zilean',1),('징크스','TFT4_Jinx',1),('카시오페아','TFT4_Cassiopeia',1),('카타리나','TFT4_Katarina',1),('칼리스타','TFT4_Kalista',1),('케넨','TFT4_Kennen',1),('케인','TFT4_Kayn',1),('킨드레드','TFT4_Kindred',1),('탈론','TFT4_Talon',1),('탐 켄치','TFT4_TahmKench',1),('탐켄치','TFT4_TahmKench',0),('트위스티드 페이트','TFT4_TwistedFate',1),('트위스티드페이트','TFT4_TwistedFate',0),('트페','TFT4_TwistedFate',0),('티모','TFT4_Teemo',1),('파이크','TFT4_Pyke',1),('피오라','TFT4_Fiora',1),('헤카림','TFT4_Hecarim',1);
18 20
19 CREATE TABLE `character_items` ( 21 CREATE TABLE `character_items` (
20 `character_id` varchar(32) NOT NULL, 22 `character_id` varchar(32) NOT NULL,
...@@ -22,7 +24,55 @@ CREATE TABLE `character_items` ( ...@@ -22,7 +24,55 @@ CREATE TABLE `character_items` (
22 `count` int(11) NOT NULL, 24 `count` int(11) NOT NULL,
23 PRIMARY KEY (`character_id`,`item`), 25 PRIMARY KEY (`character_id`,`item`),
24 KEY `character_items_count_IDX` (`count`) USING BTREE 26 KEY `character_items_count_IDX` (`count`) USING BTREE
25 -) ENGINE=InnoDB DEFAULT CHARSET=utf8 27 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
28 +
29 +CREATE TABLE `character_traits` (
30 + `character_id` varchar(32) NOT NULL,
31 + `trait` varchar(32) NOT NULL,
32 + PRIMARY KEY (`character_id`,`trait`)
33 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
34 +
35 +INSERT INTO `character_traits` VALUES ('TFT4_Aatrox','Cultist'),('TFT4_Aatrox','Set4_Vanguard'),('TFT4_Ahri','Set4_Mage'),('TFT4_Ahri','Set4_Spirit'),('TFT4_Akali','Set4_Assassin'),('TFT4_Akali','Set4_Ninja'),('TFT4_Annie','Fortune'),('TFT4_Annie','Set4_Mage'),('TFT4_Aphelios','Hunter'),('TFT4_Aphelios','Moonlight'),('TFT4_Ashe','Hunter'),('TFT4_Ashe','Set4_Elderwood'),('TFT4_Azir','Emperor'),('TFT4_Azir','Keeper'),('TFT4_Azir','Warlord'),('TFT4_Cassiopeia','Dusk'),('TFT4_Cassiopeia','Set4_Mystic'),('TFT4_Diana','Moonlight'),('TFT4_Diana','Set4_Assassin'),('TFT4_Elise','Cultist'),('TFT4_Elise','Keeper'),('TFT4_Evelynn','Cultist'),('TFT4_Evelynn','Set4_Shade'),('TFT4_Ezreal','Set4_Dazzler'),('TFT4_Ezreal','Set4_Elderwood'),('TFT4_Fiora','Duelist'),('TFT4_Fiora','Set4_Enlightened'),('TFT4_Garen','Set4_Vanguard'),('TFT4_Garen','Warlord'),('TFT4_Hecarim','Set4_Elderwood'),('TFT4_Hecarim','Set4_Vanguard'),('TFT4_Irelia','Divine'),('TFT4_Irelia','Set4_Adept'),('TFT4_Irelia','Set4_Enlightened'),('TFT4_Janna','Set4_Enlightened'),('TFT4_Janna','Set4_Mystic'),('TFT4_JarvanIV','Keeper'),('TFT4_JarvanIV','Warlord'),('TFT4_Jax','Divine'),('TFT4_Jax','Duelist'),('TFT4_Jhin','Cultist'),('TFT4_Jhin','Sharpshooter'),('TFT4_Jinx','Fortune'),('TFT4_Jinx','Sharpshooter'),('TFT4_Kalista','Cultist'),('TFT4_Kalista','Duelist'),('TFT4_Katarina','Fortune'),('TFT4_Katarina','Set4_Assassin'),('TFT4_Katarina','Warlord'),('TFT4_Kayn','Set4_Shade'),('TFT4_Kayn','Set4_Tormented'),('TFT4_Kennen','Keeper'),('TFT4_Kennen','Set4_Ninja'),('TFT4_Kindred','Hunter'),('TFT4_Kindred','Set4_Spirit'),('TFT4_LeeSin','Divine'),('TFT4_LeeSin','Duelist'),('TFT4_Lillia','Dusk'),('TFT4_Lillia','Set4_Mage'),('TFT4_Lissandra','Moonlight'),('TFT4_Lissandra','Set4_Dazzler'),('TFT4_Lulu','Set4_Elderwood'),('TFT4_Lulu','Set4_Mage'),('TFT4_Lux','Divine'),('TFT4_Lux','Set4_Dazzler'),('TFT4_Maokai','Set4_Brawler'),('TFT4_Maokai','Set4_Elderwood'),('TFT4_Morgana','Set4_Dazzler'),('TFT4_Morgana','Set4_Enlightened'),('TFT4_Nami','Set4_Enlightened'),('TFT4_Nami','Set4_Mage'),('TFT4_Nidalee','Sharpshooter'),('TFT4_Nidalee','Warlord'),('TFT4_Nunu','Set4_Brawler'),('TFT4_Nunu','Set4_Elderwood'),('TFT4_Pyke','Cultist'),('TFT4_Pyke','Set4_Assassin'),('TFT4_Riven','Dusk'),('TFT4_Riven','Keeper'),('TFT4_Sejuani','Fortune'),('TFT4_Sejuani','Set4_Vanguard'),('TFT4_Sett','Boss'),('TFT4_Sett','Set4_Brawler'),('TFT4_Shen','Set4_Adept'),('TFT4_Shen','Set4_Mystic'),('TFT4_Shen','Set4_Ninja'),('TFT4_Sylas','Moonlight'),('TFT4_Sylas','Set4_Brawler'),('TFT4_TahmKench','Fortune'),('TFT4_TahmKench','Set4_Brawler'),('TFT4_Talon','Set4_Assassin'),('TFT4_Talon','Set4_Enlightened'),('TFT4_Teemo','Set4_Spirit'),('TFT4_Teemo','Sharpshooter'),('TFT4_Thresh','Dusk'),('TFT4_Thresh','Set4_Vanguard'),('TFT4_TwistedFate','Cultist'),('TFT4_TwistedFate','Set4_Mage'),('TFT4_Vayne','Dusk'),('TFT4_Vayne','Sharpshooter'),('TFT4_Veigar','Set4_Elderwood'),('TFT4_Veigar','Set4_Mage'),('TFT4_Vi','Set4_Brawler'),('TFT4_Vi','Warlord'),('TFT4_Warwick','Divine'),('TFT4_Warwick','Hunter'),('TFT4_Warwick','Set4_Brawler'),('TFT4_Wukong','Divine'),('TFT4_Wukong','Set4_Vanguard'),('TFT4_XinZhao','Duelist'),('TFT4_XinZhao','Warlord'),('TFT4_Yasuo','Duelist'),('TFT4_Yasuo','Set4_Exile'),('TFT4_Yone','Set4_Adept'),('TFT4_Yone','Set4_Exile'),('TFT4_Yuumi','Set4_Mystic'),('TFT4_Yuumi','Set4_Spirit'),('TFT4_Zed','Set4_Ninja'),('TFT4_Zed','Set4_Shade'),('TFT4_Zilean','Cultist'),('TFT4_Zilean','Set4_Mystic');
36 +
37 +CREATE TABLE `decks` (
38 + `character_1` varchar(32) NOT NULL,
39 + `character_2` varchar(32) NOT NULL,
40 + `character_3` varchar(32) NOT NULL,
41 + `character_4` varchar(32) NOT NULL,
42 + `character_5` varchar(32) NOT NULL,
43 + `character_6` varchar(32) NOT NULL,
44 + `character_7` varchar(32) NOT NULL,
45 + `character_8` varchar(32) NOT NULL,
46 + `chosen` varchar(32) NOT NULL,
47 + `count` int(11) DEFAULT NULL,
48 + PRIMARY KEY (`character_1`,`character_2`,`character_3`,`character_4`,`character_5`,`character_6`,`character_7`,`character_8`,`chosen`)
49 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
50 +
51 +CREATE TABLE `items` (
52 + `id` int(11) NOT NULL,
53 + `name` varchar(32) DEFAULT NULL,
54 + PRIMARY KEY (`id`)
55 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
56 +
57 +INSERT INTO `items` VALUES (1,'B.F.대검'),(2,'곡궁'),(3,'쓸대없이 큰 지팡이'),(4,'여신의 눈물'),(5,'쇠사슬 조끼'),(6,'음전자 망토'),(7,'거인의 허리띠'),(8,'뒤집개'),(9,'연습용 장갑'),(11,'죽음의 검'),(12,'거인 학살자'),(13,'마법공학 총검'),(14,'쇼진의 창'),(15,'수호 천사'),(16,'피바라기'),(17,'지크의 정령'),(18,'신성의 검'),(19,'무한의 대검'),(22,'고속 연사포'),(23,'구인수의 격노검'),(24,'스태틱의 단검'),(25,'거인의 결의'),(26,'루난의 허리케인'),(27,'즈롯 차원문'),(28,'결투가의 열정'),(29,'최후의 속삭임'),(33,'라바돈의 죽음모자'),(34,'루덴의 메아리'),(35,'강철의 솔라리 펜던트'),(36,'이온 충격기'),(37,'모렐로노미콘'),(38,'황혼의 성위'),(39,'보석 건틀릿'),(44,'푸른 파수꾼'),(45,'얼어붙은 심장'),(46,'힘의 성배'),(47,'구원'),(48,'요술사의 모자'),(49,'정의의 손길'),(55,'덤블 조끼'),(56,'가고일 돌갑옷'),(57,'태양불꽃 망토'),(58,'수호자의 흉갑'),(59,'침묵의 장막'),(66,'용의 발톱'),(67,'서풍'),(68,'나무정령 새싹'),(69,'수은'),(77,'워모그의 갑옷'),(78,'대장군의 깃발'),(79,'덫 발톱'),(88,'대자연의 힘'),(89,'요우무의 유령검'),(99,'도적의 장갑');
58 +
59 +CREATE TABLE `trait_levels` (
60 + `trait_id` varchar(32) NOT NULL,
61 + `count` int(11) NOT NULL,
62 + `level` int(11) DEFAULT NULL,
63 + PRIMARY KEY (`trait_id`,`count`)
64 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
65 +
66 +INSERT INTO `trait_levels` VALUES ('Boss',1,3),('Cultist',3,1),('Cultist',6,3),('Cultist',9,4),('Divine',2,1),('Divine',4,2),('Divine',6,3),('Divine',8,4),('Duelist',2,1),('Duelist',4,2),('Duelist',6,3),('Duelist',8,4),('Dusk',2,1),('Dusk',4,2),('Dusk',6,3),('Emperor',1,3),('Fortune',3,3),('Fortune',6,4),('Hunter',2,1),('Hunter',3,2),('Hunter',4,3),('Hunter',5,4),('Keeper',2,1),('Keeper',4,3),('Keeper',6,4),('Moonlight',3,3),('Moonlight',5,4),('Set4_Adept',2,1),('Set4_Adept',3,3),('Set4_Adept',4,4),('Set4_Assassin',2,1),('Set4_Assassin',4,3),('Set4_Assassin',6,4),('Set4_Brawler',2,1),('Set4_Brawler',4,2),('Set4_Brawler',6,3),('Set4_Brawler',8,4),('Set4_Dazzler',2,1),('Set4_Dazzler',4,3),('Set4_Elderwood',3,1),('Set4_Elderwood',6,3),('Set4_Elderwood',9,4),('Set4_Enlightened',2,1),('Set4_Enlightened',4,2),('Set4_Enlightened',6,3),('Set4_Exile',1,1),('Set4_Exile',2,3),('Set4_Mage',3,1),('Set4_Mage',6,3),('Set4_Mage',9,4),('Set4_Mystic',2,1),('Set4_Mystic',4,3),('Set4_Mystic',6,4),('Set4_Ninja',1,1),('Set4_Ninja',4,3),('Set4_Shade',2,1),('Set4_Shade',3,3),('Set4_Shade',4,4),('Set4_Spirit',2,1),('Set4_Spirit',4,3),('Set4_Tormented',1,3),('Set4_Vanguard',2,1),('Set4_Vanguard',4,2),('Set4_Vanguard',6,3),('Set4_Vanguard',8,4),('Sharpshooter',2,1),('Sharpshooter',4,3),('Sharpshooter',6,4),('Warlord',3,1),('Warlord',6,3),('Warlord',9,4);
67 +
68 +
69 +CREATE TABLE `traits` (
70 + `id` varchar(32) NOT NULL,
71 + `name` varchar(32) DEFAULT NULL,
72 + PRIMARY KEY (`id`)
73 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
74 +
75 +INSERT INTO `traits` VALUES ('Boss','우두머리'),('Cultist','광신도'),('Divine','신성'),('Duelist','결투가'),('Dusk','황혼'),('Emperor','황제'),('Fortune','행운'),('Hunter','사냥꾼'),('Keeper','귀감'),('Moonlight','달빛'),('Set4_Adept','조율자'),('Set4_Assassin','암살자'),('Set4_Brawler','싸움꾼'),('Set4_Dazzler','현혹술사'),('Set4_Elderwood','나무정령'),('Set4_Enlightened','선지자'),('Set4_Exile','추방자'),('Set4_Mage','요술사'),('Set4_Mystic','신비술사'),('Set4_Ninja','닌자'),('Set4_Shade','그림자'),('Set4_Spirit','영혼'),('Set4_Tormented','번뇌'),('Set4_Vanguard','선봉대'),('Sharpshooter','명사수'),('Warlord','대장군');
26 ``` 76 ```
27 77
28 ## Data Analysis 78 ## Data Analysis
......