aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-20 19:55:31 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-06-20 19:55:31 +0300
commit40537dace937fc96c851c56f0cb629f36dddfd03 (patch)
tree85f1764ac794b101259706e3c9b3cf5f4c4f0691
parentfeat: improved map summary response (#43) (diff)
downloadlphub-40537dace937fc96c851c56f0cb629f36dddfd03.tar.gz
lphub-40537dace937fc96c851c56f0cb629f36dddfd03.tar.bz2
lphub-40537dace937fc96c851c56f0cb629f36dddfd03.zip
feat: improved map summary response, all routes init (#43, #46)
-rw-r--r--backend/controllers/mapController.go52
-rw-r--r--backend/database/history.sql524
-rw-r--r--backend/database/init.sql4
-rw-r--r--backend/database/route.sql279
-rw-r--r--backend/models/models.go14
5 files changed, 570 insertions, 303 deletions
diff --git a/backend/controllers/mapController.go b/backend/controllers/mapController.go
index 37b8e9b..e46b766 100644
--- a/backend/controllers/mapController.go
+++ b/backend/controllers/mapController.go
@@ -20,60 +20,44 @@ import (
20// @Router /maps/{id}/summary [get] 20// @Router /maps/{id}/summary [get]
21func FetchMapSummary(c *gin.Context) { 21func FetchMapSummary(c *gin.Context) {
22 id := c.Param("id") 22 id := c.Param("id")
23 // Get map data 23 response := models.MapSummaryResponse{Map: models.Map{}, Summary: models.MapSummary{Routes: []models.MapRoute{}}}
24 response := models.MapSummaryResponse{Map: models.Map{}, Summary: models.MapSummary{History: []models.MapHistory{}, Routes: []models.MapRoute{}}}
25 intID, err := strconv.Atoi(id) 24 intID, err := strconv.Atoi(id)
26 if err != nil { 25 if err != nil {
27 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) 26 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
28 return 27 return
29 } 28 }
29 // (
30 // SELECT COALESCE(avg(rating), 0.0)
31 // FROM route_ratings
32 // WHERE map_id = $1
33 // )
34 // Get map data
30 response.Map.ID = intID 35 response.Map.ID = intID
31 sql := `SELECT m.id, g.name, c.name, m.name, 36 sql := `SELECT m.id, g.name, c.name, m.name
32 (
33 SELECT COALESCE(avg(rating), 0.0)
34 FROM map_ratings
35 WHERE map_id = $1
36 )
37 FROM maps m 37 FROM maps m
38 INNER JOIN games g ON m.game_id = g.id 38 INNER JOIN games g ON m.game_id = g.id
39 INNER JOIN chapters c ON m.chapter_id = c.id 39 INNER JOIN chapters c ON m.chapter_id = c.id
40 WHERE m.id = $1` 40 WHERE m.id = $1`
41 err = database.DB.QueryRow(sql, id).Scan(&response.Map.ID, &response.Map.GameName, &response.Map.ChapterName, &response.Map.MapName, &response.Summary.Rating) 41 err = database.DB.QueryRow(sql, id).Scan(&response.Map.ID, &response.Map.GameName, &response.Map.ChapterName, &response.Map.MapName)
42 if err != nil { 42 if err != nil {
43 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) 43 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
44 return 44 return
45 } 45 }
46 sql = `SELECT user_name, score_count, record_date 46 // Get map routes and histories
47 FROM map_history 47 sql = `SELECT c.id, c.name, h.user_name, h.score_count, h.record_date, r.score_count, r.description, r.showcase, COALESCE(avg(rating), 0.0) FROM map_routes r
48 WHERE map_id = $1 48 INNER JOIN categories c ON r.category_id = c.id
49 ORDER BY record_date ASC` 49 INNER JOIN map_history h ON r.map_id = h.map_id AND r.category_id = h.category_id
50 LEFT JOIN map_ratings rt ON r.map_id = rt.map_id AND r.category_id = rt.category_id
51 WHERE r.map_id = $1 AND h.score_count = r.score_count GROUP BY c.id, h.user_name, h.score_count, h.record_date, r.score_count, r.description, r.showcase
52 ORDER BY h.record_date ASC;`
50 rows, err := database.DB.Query(sql, id) 53 rows, err := database.DB.Query(sql, id)
51 if err != nil { 54 if err != nil {
52 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) 55 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
53 return 56 return
54 } 57 }
55 for rows.Next() { 58 for rows.Next() {
56 history := models.MapHistory{} 59 route := models.MapRoute{Category: models.Category{}, History: models.MapHistory{}}
57 err = rows.Scan(&history.RunnerName, &history.ScoreCount, &history.Date) 60 err = rows.Scan(&route.Category.ID, &route.Category.Name, &route.History.RunnerName, &route.History.ScoreCount, &route.History.Date, &route.ScoreCount, &route.Description, &route.Showcase, &route.Rating)
58 if err != nil {
59 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
60 return
61 }
62 response.Summary.History = append(response.Summary.History, history)
63 }
64 sql = `SELECT c.id, c.name, mr.score_count, mr.description, mr.showcase
65 FROM map_routes mr
66 INNER JOIN categories c ON mr.category_id = c.id
67 WHERE mr.map_id = $1
68 ORDER BY mr.score_count DESC`
69 rows, err = database.DB.Query(sql, id)
70 if err != nil {
71 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
72 return
73 }
74 for rows.Next() {
75 route := models.MapRoute{}
76 err = rows.Scan(&route.Category.ID, &route.Category.Name, &route.ScoreCount, &route.Description, &route.Showcase)
77 if err != nil { 61 if err != nil {
78 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) 62 c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error()))
79 return 63 return
diff --git a/backend/database/history.sql b/backend/database/history.sql
index 0840bf3..d7c4999 100644
--- a/backend/database/history.sql
+++ b/backend/database/history.sql
@@ -1,279 +1,279 @@
1INSERT INTO map_history(map_id,user_name,score_count,record_date) VALUES 1INSERT INTO map_history(map_id,category_id,user_name,score_count,record_date) VALUES
2-- Portal 2 Singleplayer 2-- Portal 2 Singleplayer
3-- 1 3-- 1
4(3,'slmid1995',3,'2011-10-05 00:00:00'), 4(3,1,'slmid1995',3,'2011-10-05 00:00:00'),
5(3,'LookLikeAKango',1,'2011-10-06 00:00:00'), 5(3,1,'LookLikeAKango',1,'2011-10-06 00:00:00'),
6(3,'Bananasaurus Rex',0,'2011-10-24 00:00:00'), 6(3,1,'Bananasaurus Rex',0,'2011-10-24 00:00:00'),
7(4,'Tyronis',1,'2011-10-05 00:00:00'), 7(4,1,'Tyronis',1,'2011-10-05 00:00:00'),
8(4,'Krzyhau',0,'2019-05-10 00:00:00'), 8(4,1,'Krzyhau',0,'2019-05-10 00:00:00'),
9(5,'LookLikeAKango',2,'2011-10-05 00:00:00'), 9(5,1,'LookLikeAKango',2,'2011-10-05 00:00:00'),
10(5,'Jetwash',1,'2013-12-03 00:00:00'), 10(5,1,'Jetwash',1,'2013-12-03 00:00:00'),
11(6,'Stimich',4,'2011-10-08 00:00:00'), 11(6,1,'Stimich',4,'2011-10-08 00:00:00'),
12(6,'aepaePolakrn',3,'2011-10-19 00:00:00'), 12(6,1,'aepaePolakrn',3,'2011-10-19 00:00:00'),
13(6,'Krzyhau',2,'2020-10-10 00:00:00'), 13(6,1,'Krzyhau',2,'2020-10-10 00:00:00'),
14(9,'slmid1995',4,'2011-10-05 00:00:00'), 14(9,1,'slmid1995',4,'2011-10-05 00:00:00'),
15(9,'Jokie',3,'2011-10-05 00:00:00'), 15(9,1,'Jokie',3,'2011-10-05 00:00:00'),
16(9,'Tyronis',2,'2011-10-05 00:00:00'), 16(9,1,'Tyronis',2,'2011-10-05 00:00:00'),
17(9,'sicklebrick',0,'2013-03-13 00:00:00'), 17(9,1,'sicklebrick',0,'2013-03-13 00:00:00'),
18-- 2 18-- 2
19(10,'Paraxade0',2,'2011-04-21 00:00:00'), 19(10,1,'Paraxade0',2,'2011-04-21 00:00:00'),
20(10,'PerOculos',0,'2011-04-21 00:00:00'), 20(10,1,'PerOculos',0,'2011-04-21 00:00:00'),
21(11,'Tyronis',2,'2011-10-05 00:00:00'), 21(11,1,'Tyronis',2,'2011-10-05 00:00:00'),
22(11,'Krzyhau',0,'2018-06-09 00:00:00'), 22(11,1,'Krzyhau',0,'2018-06-09 00:00:00'),
23(12,'slmid1995',2,'2011-10-04 00:00:00'), 23(12,1,'slmid1995',2,'2011-10-04 00:00:00'),
24(13,'LookLikeAKango',3,'2011-10-05 00:00:00'), 24(13,1,'LookLikeAKango',3,'2011-10-05 00:00:00'),
25(13,'Imanex',2,'2011-12-08 00:00:00'), 25(13,1,'Imanex',2,'2011-12-08 00:00:00'),
26(13,'jyjey',0,'2012-08-22 00:00:00'), 26(13,1,'jyjey',0,'2012-08-22 00:00:00'),
27(15,'Tyronis',2,'2011-10-05 00:00:00'), 27(15,1,'Tyronis',2,'2011-10-05 00:00:00'),
28(16,'LookLikeAKango',2,'2011-10-05 00:00:00'), 28(16,1,'LookLikeAKango',2,'2011-10-05 00:00:00'),
29(16,'jyjey',0,'2012-08-25 00:00:00'), 29(16,1,'jyjey',0,'2012-08-25 00:00:00'),
30(17,'rocoty',0,'2011-10-05 00:00:00'), 30(17,1,'rocoty',0,'2011-10-05 00:00:00'),
31(17,'Nidboj132',0,'2023-02-05 00:00:00'), 31(17,1,'Nidboj132',0,'2023-02-05 00:00:00'),
32-- 3 32-- 3
33(18,'The Last Tofus',5,'2011-05-08 00:00:00'), 33(18,1,'The Last Tofus',5,'2011-05-08 00:00:00'),
34(18,'Schlepian',4,'2011-10-08 00:00:00'), 34(18,1,'Schlepian',4,'2011-10-08 00:00:00'),
35(18,'szeimartin',3,'2013-10-08 00:00:00'), 35(18,1,'szeimartin',3,'2013-10-08 00:00:00'),
36(18,'Krzyhau',2,'2020-05-15 00:00:00'), 36(18,1,'Krzyhau',2,'2020-05-15 00:00:00'),
37(18,'Krzyhau',0,'2022-07-02 00:00:00'), 37(18,1,'Krzyhau',0,'2022-07-02 00:00:00'),
38(19,'LookLikeAKango',2,'2011-10-06 00:00:00'), 38(19,1,'LookLikeAKango',2,'2011-10-06 00:00:00'),
39(20,'Djinndrache',5,'2011-10-20 00:00:00'), 39(20,1,'Djinndrache',5,'2011-10-20 00:00:00'),
40(20,'Schlepian',4,'2011-10-30 00:00:00'), 40(20,1,'Schlepian',4,'2011-10-30 00:00:00'),
41(20,'Jetwash',3,'2014-09-04 00:00:00'), 41(20,1,'Jetwash',3,'2014-09-04 00:00:00'),
42(20,'Krzyhau',2,'2022-04-24 00:00:00'), 42(20,1,'Krzyhau',2,'2022-04-24 00:00:00'),
43(21,'LookLikeAKango',4,'2011-10-06 00:00:00'), 43(21,1,'LookLikeAKango',4,'2011-10-06 00:00:00'),
44(21,'ncla',2,'2011-10-30 00:00:00'), 44(21,1,'ncla',2,'2011-10-30 00:00:00'),
45(21,'PerOculos',0,'2019-07-08 00:00:00'), 45(21,1,'PerOculos',0,'2019-07-08 00:00:00'),
46(22,'Tyronis',0,'2011-10-05 00:00:00'), 46(22,1,'Tyronis',0,'2011-10-05 00:00:00'),
47(23,'LookLikeAKango',2,'2011-10-06 00:00:00'), 47(23,1,'LookLikeAKango',2,'2011-10-06 00:00:00'),
48(23,'Krzyhau',0,'2018-08-01 00:00:00'), 48(23,1,'Krzyhau',0,'2018-08-01 00:00:00'),
49(24,'LeviHB',0,'2011-04-30 00:00:00'), 49(24,1,'LeviHB',0,'2011-04-30 00:00:00'),
50(25,'Tyronis',0,'2011-10-06 00:00:00'), 50(25,1,'Tyronis',0,'2011-10-06 00:00:00'),
51(26,'Schlepian',3,'2011-10-30 00:00:00'), 51(26,1,'Schlepian',3,'2011-10-30 00:00:00'),
52(26,'Tyronis',2,'2012-01-08 00:00:00'), 52(26,1,'Tyronis',2,'2012-01-08 00:00:00'),
53(26,'PerOculos',0,'2016-06-08 00:00:00'), 53(26,1,'PerOculos',0,'2016-06-08 00:00:00'),
54-- 4 54-- 4
55(27,'LeviHB',2,'2011-05-01 00:00:00'), 55(27,1,'LeviHB',2,'2011-05-01 00:00:00'),
56(27,'PerOculos',0,'2020-07-13 00:00:00'), 56(27,1,'PerOculos',0,'2020-07-13 00:00:00'),
57(28,'LeviHB',7,'2011-05-01 00:00:00'), 57(28,1,'LeviHB',7,'2011-05-01 00:00:00'),
58(28,'Andy M.J.',2,'2011-10-07 00:00:00'), 58(28,1,'Andy M.J.',2,'2011-10-07 00:00:00'),
59(28,'Krzyhau',0,'2018-05-19 00:00:00'), 59(28,1,'Krzyhau',0,'2018-05-19 00:00:00'),
60(29,'LeviHB',0,'2011-05-01 00:00:00'), 60(29,1,'LeviHB',0,'2011-05-01 00:00:00'),
61(30,'Schlepian',2,'2011-10-30 00:00:00'), 61(30,1,'Schlepian',2,'2011-10-30 00:00:00'),
62(31,'Tyronis',0,'2011-10-06 00:00:00'), 62(31,1,'Tyronis',0,'2011-10-06 00:00:00'),
63-- 5 63-- 5
64(32,'Tyronis',6,'2011-10-21 00:00:00'), 64(32,1,'Tyronis',6,'2011-10-21 00:00:00'),
65(32,'Nidboj132',5,'2022-04-24 00:00:00'), 65(32,1,'Nidboj132',5,'2022-04-24 00:00:00'),
66(33,'Tyronis',7,'2011-10-06 00:00:00'), 66(33,1,'Tyronis',7,'2011-10-06 00:00:00'),
67(33,'ISimmo',5,'2011-11-02 00:00:00'), 67(33,1,'ISimmo',5,'2011-11-02 00:00:00'),
68(33,'PerOculos',4,'2017-05-30 00:00:00'), 68(33,1,'PerOculos',4,'2017-05-30 00:00:00'),
69(34,'Schlepian',3,'2011-11-01 00:00:00'), 69(34,1,'Schlepian',3,'2011-11-01 00:00:00'),
70(34,'Krzyhau',2,'2020-10-14 00:00:00'), 70(34,1,'Krzyhau',2,'2020-10-14 00:00:00'),
71(34,'zach',0,'2022-11-02 00:00:00'), 71(34,1,'zach',0,'2022-11-02 00:00:00'),
72(35,'Krank',2,'2012-07-28 00:00:00'), 72(35,1,'Krank',2,'2012-07-28 00:00:00'),
73-- 6 73-- 6
74(36,'Tyronis',6,'2011-10-06 00:00:00'), 74(36,1,'Tyronis',6,'2011-10-06 00:00:00'),
75(36,'CalmlyFrenetic',5,'2011-10-09 00:00:00'), 75(36,1,'CalmlyFrenetic',5,'2011-10-09 00:00:00'),
76(36,'sicklebrick',4,'2012-09-13 00:00:00'), 76(36,1,'sicklebrick',4,'2012-09-13 00:00:00'),
77(36,'Nidboj132',2,'2023-03-04 00:00:00'), 77(36,1,'Nidboj132',2,'2023-03-04 00:00:00'),
78(37,'LookLikeAKango',7,'2011-10-06 00:00:00'), 78(37,1,'LookLikeAKango',7,'2011-10-06 00:00:00'),
79(37,'Schlepian',6,'2011-11-01 00:00:00'), 79(37,1,'Schlepian',6,'2011-11-01 00:00:00'),
80(37,'Tyronis',5,'2012-01-28 00:00:00'), 80(37,1,'Tyronis',5,'2012-01-28 00:00:00'),
81(37,'Nidboj132',4,'2021-08-22 00:00:00'), 81(37,1,'Nidboj132',4,'2021-08-22 00:00:00'),
82(38,'Andy M.J.',2,'2011-10-06 00:00:00'), 82(38,1,'Andy M.J.',2,'2011-10-06 00:00:00'),
83(38,'Sanguine Dagger',0,'2012-03-19 00:00:00'), 83(38,1,'Sanguine Dagger',0,'2012-03-19 00:00:00'),
84(39,'Lambda Core',6,'2011-05-13 00:00:00'), 84(39,1,'Lambda Core',6,'2011-05-13 00:00:00'),
85(39,'The Last Tofus',5,'2011-05-13 00:00:00'), 85(39,1,'The Last Tofus',5,'2011-05-13 00:00:00'),
86(39,'LookLikeAKango',4,'2011-10-16 00:00:00'), 86(39,1,'LookLikeAKango',4,'2011-10-16 00:00:00'),
87(39,'Kittaye',3,'2013-03-25 00:00:00'), 87(39,1,'Kittaye',3,'2013-03-25 00:00:00'),
88(40,'LookLikeAKango',7,'2011-10-07 00:00:00'), 88(40,1,'LookLikeAKango',7,'2011-10-07 00:00:00'),
89(40,'Schlepian',6,'2011-11-05 00:00:00'), 89(40,1,'Schlepian',6,'2011-11-05 00:00:00'),
90(40,'Kittaye',4,'2013-04-01 00:00:00'), 90(40,1,'Kittaye',4,'2013-04-01 00:00:00'),
91(40,'Kittaye',3,'2014-09-13 00:00:00'), 91(40,1,'Kittaye',3,'2014-09-13 00:00:00'),
92(40,'szeimartin',2,'2014-09-13 00:00:00'), 92(40,1,'szeimartin',2,'2014-09-13 00:00:00'),
93(40,'Kittaye',0,'2014-09-15 00:00:00'), 93(40,1,'Kittaye',0,'2014-09-15 00:00:00'),
94(41,'CalmlyFrenetic',7,'2011-10-09 00:00:00'), 94(41,1,'CalmlyFrenetic',7,'2011-10-09 00:00:00'),
95(41,'Jaso',6,'2011-10-11 00:00:00'), 95(41,1,'Jaso',6,'2011-10-11 00:00:00'),
96(41,'Krank',5,'2012-07-17 00:00:00'), 96(41,1,'Krank',5,'2012-07-17 00:00:00'),
97-- 7 97-- 7
98(42,'LookLikeAKango',4,'2011-05-17 00:00:00'), 98(42,1,'LookLikeAKango',4,'2011-05-17 00:00:00'),
99(42,'ISimmo',2,'2011-11-07 00:00:00'), 99(42,1,'ISimmo',2,'2011-11-07 00:00:00'),
100(43,'lmao4ever',5,'2011-10-30 00:00:00'), 100(43,1,'lmao4ever',5,'2011-10-30 00:00:00'),
101(43,'Jaso',2,'2011-11-09 00:00:00'), 101(43,1,'Jaso',2,'2011-11-09 00:00:00'),
102(43,'feliser',0,'2022-06-26 00:00:00'), 102(43,1,'feliser',0,'2022-06-26 00:00:00'),
103(44,'LookLikeAKango',18,'2011-10-07 00:00:00'), 103(44,1,'LookLikeAKango',18,'2011-10-07 00:00:00'),
104(44,'Tyronis',13,'2011-10-30 00:00:00'), 104(44,1,'Tyronis',13,'2011-10-30 00:00:00'),
105(44,'Tyronis',12,'2011-11-10 00:00:00'), 105(44,1,'Tyronis',12,'2011-11-10 00:00:00'),
106(44,'Jetwash',11,'2017-06-12 00:00:00'), 106(44,1,'Jetwash',11,'2017-06-12 00:00:00'),
107(44,'Krzyhau',9,'2022-01-02 00:00:00'), 107(44,1,'Krzyhau',9,'2022-01-02 00:00:00'),
108(45,'LookLikeAKango',23,'2011-10-08 00:00:00'), 108(45,1,'LookLikeAKango',23,'2011-10-08 00:00:00'),
109(45,'CalmlyFrenetic',22,'2011-10-09 00:00:00'), 109(45,1,'CalmlyFrenetic',22,'2011-10-09 00:00:00'),
110(45,'cgreactor',17,'2011-10-09 00:00:00'), 110(45,1,'cgreactor',17,'2011-10-09 00:00:00'),
111(45,'CalmlyFrenetic',16,'2011-10-10 00:00:00'), 111(45,1,'CalmlyFrenetic',16,'2011-10-10 00:00:00'),
112(45,'LookLikeAKango',15,'2011-10-19 00:00:00'), 112(45,1,'LookLikeAKango',15,'2011-10-19 00:00:00'),
113(45,'Jaso',12,'2012-07-19 00:00:00'), 113(45,1,'Jaso',12,'2012-07-19 00:00:00'),
114(45,'Krank',10,'2013-01-31 00:00:00'), 114(45,1,'Krank',10,'2013-01-31 00:00:00'),
115(45,'Kittaye',7,'2013-04-04 00:00:00'), 115(45,1,'Kittaye',7,'2013-04-04 00:00:00'),
116(45,'PerOculos',4,'2014-09-13 00:00:00'), 116(45,1,'PerOculos',4,'2014-09-13 00:00:00'),
117-- 8 117-- 8
118(46,'sparkle1princess',6,'2012-03-24 00:00:00'), 118(46,1,'sparkle1princess',6,'2012-03-24 00:00:00'),
119(46,'Krzyhau',2,'2019-11-21 00:00:00'), 119(46,1,'Krzyhau',2,'2019-11-21 00:00:00'),
120(47,'holydevel',2,'2011-10-06 00:00:00'), 120(47,1,'holydevel',2,'2011-10-06 00:00:00'),
121(47,'JesusCatFace',0,'2015-01-16 00:00:00'), 121(47,1,'JesusCatFace',0,'2015-01-16 00:00:00'),
122(48,'LookLikeAKango',5,'2011-10-08 00:00:00'), 122(48,1,'LookLikeAKango',5,'2011-10-08 00:00:00'),
123(48,'Tyronis',2,'2011-10-08 00:00:00'), 123(48,1,'Tyronis',2,'2011-10-08 00:00:00'),
124(48,'adzicents',0,'2011-10-09 00:00:00'), 124(48,1,'adzicents',0,'2011-10-09 00:00:00'),
125(49,'adzicents',4,'2011-10-07 00:00:00'), 125(49,1,'adzicents',4,'2011-10-07 00:00:00'),
126(49,'Schlepian',2,'2011-10-08 00:00:00'), 126(49,1,'Schlepian',2,'2011-10-08 00:00:00'),
127(49,'Nidboj132',0,'2022-09-26 00:00:00'), 127(49,1,'Nidboj132',0,'2022-09-26 00:00:00'),
128(50,'LookLikeAKango',4,'2011-10-08 00:00:00'), 128(50,1,'LookLikeAKango',4,'2011-10-08 00:00:00'),
129(50,'Tyronis',2,'2011-10-11 00:00:00'), 129(50,1,'Tyronis',2,'2011-10-11 00:00:00'),
130(50,'sicklebrick',0,'2013-03-20 00:00:00'), 130(50,1,'sicklebrick',0,'2013-03-20 00:00:00'),
131(51,'Andy M.J.',3,'2011-10-08 00:00:00'), 131(51,1,'Andy M.J.',3,'2011-10-08 00:00:00'),
132(51,'LookLikeAKango',2,'2011-10-20 00:00:00'), 132(51,1,'LookLikeAKango',2,'2011-10-20 00:00:00'),
133(52,'Jaso',0,'2011-10-10 00:00:00'), 133(52,1,'Jaso',0,'2011-10-10 00:00:00'),
134(53,'LookLikeAKango',9,'2011-10-08 00:00:00'), 134(53,1,'LookLikeAKango',9,'2011-10-08 00:00:00'),
135(53,'LookLikeAKango',2,'2011-10-20 00:00:00'), 135(53,1,'LookLikeAKango',2,'2011-10-20 00:00:00'),
136(53,'Schlepian',0,'2011-11-06 00:00:00'), 136(53,1,'Schlepian',0,'2011-11-06 00:00:00'),
137(54,'LookLikeAKango',7,'2011-06-01 00:00:00'), 137(54,1,'LookLikeAKango',7,'2011-06-01 00:00:00'),
138(54,'Jaso',6,'2011-10-09 00:00:00'), 138(54,1,'Jaso',6,'2011-10-09 00:00:00'),
139(54,'Schlepian',5,'2011-11-06 00:00:00'), 139(54,1,'Schlepian',5,'2011-11-06 00:00:00'),
140(54,'Spyrunite',4,'2012-08-30 00:00:00'), 140(54,1,'Spyrunite',4,'2012-08-30 00:00:00'),
141(54,'Krzyhau',3,'2019-04-22 00:00:00'), 141(54,1,'Krzyhau',3,'2019-04-22 00:00:00'),
142(55,'LookLikeAKango',7,'2011-10-08 00:00:00'), 142(55,1,'LookLikeAKango',7,'2011-10-08 00:00:00'),
143(55,'CalmlyFrenetic',3,'2011-10-09 00:00:00'), 143(55,1,'CalmlyFrenetic',3,'2011-10-09 00:00:00'),
144(55,'Jaso',2,'2011-11-26 00:00:00'), 144(55,1,'Jaso',2,'2011-11-26 00:00:00'),
145(55,'PerOculos',0,'2021-02-06 00:00:00'), 145(55,1,'PerOculos',0,'2021-02-06 00:00:00'),
146(56,'CalmlyFrenetic',9,'2011-10-08 00:00:00'), 146(56,1,'CalmlyFrenetic',9,'2011-10-08 00:00:00'),
147(56,'LookLikeAKango',5,'2011-10-09 00:00:00'), 147(56,1,'LookLikeAKango',5,'2011-10-09 00:00:00'),
148(56,'CalmlyFrenetic',4,'2011-10-09 00:00:00'), 148(56,1,'CalmlyFrenetic',4,'2011-10-09 00:00:00'),
149(56,'Jetwash',2,'2014-09-05 00:00:00'), 149(56,1,'Jetwash',2,'2014-09-05 00:00:00'),
150-- 9 150-- 9
151(57,'JNS',7,'2011-07-21 00:00:00'), 151(57,1,'JNS',7,'2011-07-21 00:00:00'),
152(57,'Krank',5,'2012-07-29 00:00:00'), 152(57,1,'Krank',5,'2012-07-29 00:00:00'),
153(57,'Krzyhau',0,'2017-10-29 00:00:00'), 153(57,1,'Krzyhau',0,'2017-10-29 00:00:00'),
154(58,'Stimich',2,'2011-10-11 00:00:00'), 154(58,1,'Stimich',2,'2011-10-11 00:00:00'),
155(59,'Isimmo',7,'2011-11-04 00:00:00'), 155(59,1,'Isimmo',7,'2011-11-04 00:00:00'),
156(59,'sicklebrick',6,'2013-03-20 00:00:00'), 156(59,1,'sicklebrick',6,'2013-03-20 00:00:00'),
157(60,'CalmlyFrenetic',7,'2011-10-19 00:00:00'), 157(60,1,'CalmlyFrenetic',7,'2011-10-19 00:00:00'),
158(60,'Tyronis',6,'2011-11-01 00:00:00'), 158(60,1,'Tyronis',6,'2011-11-01 00:00:00'),
159-- Portal 2 Cooperative 159-- Portal 2 Cooperative
160-- 1 160-- 1
161(63,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'), 161(63,1,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'),
162(64,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 162(64,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
163(64,'Chubfish & Exhale',2,'2011-11-01 00:00:00'), 163(64,1,'Chubfish & Exhale',2,'2011-11-01 00:00:00'),
164(65,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 164(65,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
165(65,'Nidboj132 & Oryn',3,'2022-02-03 00:00:00'), 165(65,1,'Nidboj132 & Oryn',3,'2022-02-03 00:00:00'),
166(66,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 166(66,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
167(66,'Schlepian & Chubfish',2,'2011-10-01 00:00:00'), 167(66,1,'Schlepian & Chubfish',2,'2011-10-01 00:00:00'),
168(67,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'), 168(67,1,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'),
169(68,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'), 169(68,1,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'),
170-- 2 170-- 2
171(69,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 171(69,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
172(70,'Mathias123961 & Sir Spawn Alot',6,'2011-08-01 00:00:00'), 172(70,1,'Mathias123961 & Sir Spawn Alot',6,'2011-08-01 00:00:00'),
173(70,'Schlepian & Chubfish',4,'2011-10-01 00:00:00'), 173(70,1,'Schlepian & Chubfish',4,'2011-10-01 00:00:00'),
174(70,'Gocnak & z1mb0bw4y',2,'2012-08-03 00:00:00'), 174(70,1,'Gocnak & z1mb0bw4y',2,'2012-08-03 00:00:00'),
175(70,'DM_ & VEGA',0,'2017-10-01 00:00:00'), 175(70,1,'DM_ & VEGA',0,'2017-10-01 00:00:00'),
176(71,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 176(71,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
177(71,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'), 177(71,1,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'),
178(72,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 178(72,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
179(72,'Schlepian & LongJohnDickWeed',2,'2011-10-01 00:00:00'), 179(72,1,'Schlepian & LongJohnDickWeed',2,'2011-10-01 00:00:00'),
180(73,'Stimich & HiTMaRkS',9,'2011-05-09 00:00:00'), 180(73,1,'Stimich & HiTMaRkS',9,'2011-05-09 00:00:00'),
181(73,'Mathias123961 & Sir Spawn Alot',8,'2011-08-01 00:00:00'), 181(73,1,'Mathias123961 & Sir Spawn Alot',8,'2011-08-01 00:00:00'),
182(73,'Schlepian & Lemonsunshine',7,'2011-11-01 00:00:00'), 182(73,1,'Schlepian & Lemonsunshine',7,'2011-11-01 00:00:00'),
183(73,'DM_ & LsDK_',6,'2018-01-01 00:00:00'), 183(73,1,'DM_ & LsDK_',6,'2018-01-01 00:00:00'),
184(73,'Krzyhau & Klooger',4,'2018-11-01 00:00:00'), 184(73,1,'Krzyhau & Klooger',4,'2018-11-01 00:00:00'),
185(74,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'), 185(74,1,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'),
186(74,'Stimich & Pitkakorva',7,'2011-10-11 00:00:00'), 186(74,1,'Stimich & Pitkakorva',7,'2011-10-11 00:00:00'),
187(74,'Schlepian & Isimmo',3,'2011-10-28 00:00:00'), 187(74,1,'Schlepian & Isimmo',3,'2011-10-28 00:00:00'),
188(74,'Zypeh & szeimartin',2,'2013-11-01 00:00:00'), 188(74,1,'Zypeh & szeimartin',2,'2013-11-01 00:00:00'),
189(75,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'), 189(75,1,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'),
190(75,'Schlepian & Urination',4,'2011-10-01 00:00:00'), 190(75,1,'Schlepian & Urination',4,'2011-10-01 00:00:00'),
191(75,'Schlepian & Lemonsunshine',2,'2012-02-01 00:00:00'), 191(75,1,'Schlepian & Lemonsunshine',2,'2012-02-01 00:00:00'),
192(75,'DM_ & follon',0,'2015-04-01 00:00:00'), 192(75,1,'DM_ & follon',0,'2015-04-01 00:00:00'),
193(76,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 193(76,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
194(76,'Chubfish & Exhale',0,'2011-12-01 00:00:00'), 194(76,1,'Chubfish & Exhale',0,'2011-12-01 00:00:00'),
195-- 3 195-- 3
196(77,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 196(77,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
197(78,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 197(78,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
198(78,'DM_ & marK',3,'2016-11-01 00:00:00'), 198(78,1,'DM_ & marK',3,'2016-11-01 00:00:00'),
199(78,'Nidboj132 & Oryn',2,'2021-09-04 00:00:00'), 199(78,1,'Nidboj132 & Oryn',2,'2021-09-04 00:00:00'),
200(79,'ganonscrub & ?',5,'2011-04-01 00:00:00'), 200(79,1,'ganonscrub & ?',5,'2011-04-01 00:00:00'),
201(79,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 201(79,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
202(79,'Chubfish & Exhale',2,'2012-08-04 00:00:00'), 202(79,1,'Chubfish & Exhale',2,'2012-08-04 00:00:00'),
203(80,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'), 203(80,1,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'),
204(80,'Chubfish & Exhale',4,'2011-12-01 00:00:00'), 204(80,1,'Chubfish & Exhale',4,'2011-12-01 00:00:00'),
205(81,'Mathias123961 & Sir Spawn Alot',7,'2011-08-01 00:00:00'), 205(81,1,'Mathias123961 & Sir Spawn Alot',7,'2011-08-01 00:00:00'),
206(81,'Schlepian & Lemonsunshine',6,'2011-10-01 00:00:00'), 206(81,1,'Schlepian & Lemonsunshine',6,'2011-10-01 00:00:00'),
207(81,'takz & dawn',5,'2011-11-01 00:00:00'), 207(81,1,'takz & dawn',5,'2011-11-01 00:00:00'),
208(81,'Nidboj132 & Oryn',4,'2021-03-25 00:00:00'), 208(81,1,'Nidboj132 & Oryn',4,'2021-03-25 00:00:00'),
209(82,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 209(82,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
210(83,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'), 210(83,1,'Mathias123961 & Sir Spawn Alot',5,'2011-08-01 00:00:00'),
211(83,'Schlepian & Lemonsunshine',2,'2011-10-01 00:00:00'), 211(83,1,'Schlepian & Lemonsunshine',2,'2011-10-01 00:00:00'),
212(83,'Chubfish & Exhale',0,'2011-12-01 00:00:00'), 212(83,1,'Chubfish & Exhale',0,'2011-12-01 00:00:00'),
213(84,'Mathias123961 & Sir Spawn Alot',6,'2011-08-01 00:00:00'), 213(84,1,'Mathias123961 & Sir Spawn Alot',6,'2011-08-01 00:00:00'),
214(84,'Schlepian & Chubfish',4,'2011-10-01 00:00:00'), 214(84,1,'Schlepian & Chubfish',4,'2011-10-01 00:00:00'),
215(84,'Chubfish & Exhale',2,'2012-01-01 00:00:00'), 215(84,1,'Chubfish & Exhale',2,'2012-01-01 00:00:00'),
216(84,'DM_ & wS',0,'2015-05-01 00:00:00'), 216(84,1,'DM_ & wS',0,'2015-05-01 00:00:00'),
217-- 4 217-- 4
218(85,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 218(85,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
219(85,'Chubfish & Exhale',0,'2011-10-01 00:00:00'), 219(85,1,'Chubfish & Exhale',0,'2011-10-01 00:00:00'),
220(86,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 220(86,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
221(86,'Chubfish & Exhale',0,'2011-12-01 00:00:00'), 221(86,1,'Chubfish & Exhale',0,'2011-12-01 00:00:00'),
222(87,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'), 222(87,1,'Mathias123961 & Sir Spawn Alot',3,'2011-08-01 00:00:00'),
223(87,'Schlepian & Gopherdude',2,'2011-10-01 00:00:00'), 223(87,1,'Schlepian & Gopherdude',2,'2011-10-01 00:00:00'),
224(87,'DM_ & follon',0,'2015-04-01 00:00:00'), 224(87,1,'DM_ & follon',0,'2015-04-01 00:00:00'),
225(88,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 225(88,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
226(88,'Schlepian & Gopherdude',0,'2011-10-01 00:00:00'), 226(88,1,'Schlepian & Gopherdude',0,'2011-10-01 00:00:00'),
227(89,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'), 227(89,1,'Mathias123961 & Sir Spawn Alot',0,'2011-08-01 00:00:00'),
228(90,'Mathias123961 & Sir Spawn Alot',4,'2011-09-01 00:00:00'), 228(90,1,'Mathias123961 & Sir Spawn Alot',4,'2011-09-01 00:00:00'),
229(90,'Schlepian & Urination',2,'2011-10-01 00:00:00'), 229(90,1,'Schlepian & Urination',2,'2011-10-01 00:00:00'),
230(90,'Klooger & Jetwash',0,'2016-08-01 00:00:00'), 230(90,1,'Klooger & Jetwash',0,'2016-08-01 00:00:00'),
231(91,'Mathias123961 & Sir Spawn Alot',2,'2011-08-01 00:00:00'), 231(91,1,'Mathias123961 & Sir Spawn Alot',2,'2011-08-01 00:00:00'),
232(91,'Undead & Zypeh',0,'2013-05-19 00:00:00'), 232(91,1,'Undead & Zypeh',0,'2013-05-19 00:00:00'),
233(92,'txx478 & ?',5,'2011-05-01 00:00:00'), 233(92,1,'txx478 & ?',5,'2011-05-01 00:00:00'),
234(92,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'), 234(92,1,'Mathias123961 & Sir Spawn Alot',4,'2011-08-01 00:00:00'),
235(92,'Schlepian & Gopherdude',2,'2011-10-01 00:00:00'), 235(92,1,'Schlepian & Gopherdude',2,'2011-10-01 00:00:00'),
236(92,'ncla & takz',0,'2012-02-01 00:00:00'), 236(92,1,'ncla & takz',0,'2012-02-01 00:00:00'),
237(93,'Mathias123961 & Sir Spawn Alot',2,'2011-08-01 00:00:00'), 237(93,1,'Mathias123961 & Sir Spawn Alot',2,'2011-08-01 00:00:00'),
238(93,'Schlepian & Gopherdude',0,'2011-10-01 00:00:00'), 238(93,1,'Schlepian & Gopherdude',0,'2011-10-01 00:00:00'),
239-- 5 239-- 5
240(94,'Chubfish & Exhale',2,'2011-10-01 00:00:00'), 240(94,1,'Chubfish & Exhale',2,'2011-10-01 00:00:00'),
241(94,'Klooger & Imanex',0,'2013-08-01 00:00:00'), 241(94,1,'Klooger & Imanex',0,'2013-08-01 00:00:00'),
242(95,'Schlepian & Issimoi',2,'2011-10-01 00:00:00'), 242(95,1,'Schlepian & Issimoi',2,'2011-10-01 00:00:00'),
243(96,'ThePortalPatrol & ?',4,'2011-04-01 00:00:00'), 243(96,1,'ThePortalPatrol & ?',4,'2011-04-01 00:00:00'),
244(96,'sparkle1princess & Zypeh',2,'2014-01-01 00:00:00'), 244(96,1,'sparkle1princess & Zypeh',2,'2014-01-01 00:00:00'),
245(97,'Stimich & HiTMaRkS',7,'2011-05-13 00:00:00'), 245(97,1,'Stimich & HiTMaRkS',7,'2011-05-13 00:00:00'),
246(97,'Schlepian & Lemonsunshine',4,'2011-10-01 00:00:00'), 246(97,1,'Schlepian & Lemonsunshine',4,'2011-10-01 00:00:00'),
247(97,'DM_ & wS',2,'2014-05-01 00:00:00'), 247(97,1,'DM_ & wS',2,'2014-05-01 00:00:00'),
248(98,'Imanex & 00svo',0,'2011-11-01 00:00:00'), 248(98,1,'Imanex & 00svo',0,'2011-11-01 00:00:00'),
249(99,'Schlepian & Gopherdude',3,'2011-10-01 00:00:00'), 249(99,1,'Schlepian & Gopherdude',3,'2011-10-01 00:00:00'),
250(99,'Imanex & Klooger',2,'2013-08-01 00:00:00'), 250(99,1,'Imanex & Klooger',2,'2013-08-01 00:00:00'),
251(99,'DM_ & wS',0,'2015-05-01 00:00:00'), 251(99,1,'DM_ & wS',0,'2015-05-01 00:00:00'),
252(100,'Schlepian & Bananasaurus Rex',0,'2011-10-01 00:00:00'), 252(100,1,'Schlepian & Bananasaurus Rex',0,'2011-10-01 00:00:00'),
253(101,'Chubfish & Exhale',2,'2011-12-01 00:00:00'), 253(101,1,'Chubfish & Exhale',2,'2011-12-01 00:00:00'),
254(101,'DM_ & follon',0,'2015-04-01 00:00:00'), 254(101,1,'DM_ & follon',0,'2015-04-01 00:00:00'),
255-- 6 255-- 6
256(102,'dawn & takz',3,'2011-11-18 00:00:00'), 256(102,1,'dawn & takz',3,'2011-11-18 00:00:00'),
257(102,'Chubfish & Exhale',2,'2012-01-01 00:00:00'), 257(102,1,'Chubfish & Exhale',2,'2012-01-01 00:00:00'),
258(102,'Imanex & Klooger',0,'2013-08-01 00:00:00'), 258(102,1,'Imanex & Klooger',0,'2013-08-01 00:00:00'),
259(103,'Schlepian & Lemonsunshine',0,'2011-10-01 00:00:00'), 259(103,1,'Schlepian & Lemonsunshine',0,'2011-10-01 00:00:00'),
260(104,'Schlepian & Lemonsunshine',0,'2011-10-01 00:00:00'), 260(104,1,'Schlepian & Lemonsunshine',0,'2011-10-01 00:00:00'),
261(105,'Blaizerazer & ?',8,'2011-10-01 00:00:00'), 261(105,1,'Blaizerazer & ?',8,'2011-10-01 00:00:00'),
262(105,'Schlepian & Lemonsunshine',5,'2011-11-01 00:00:00'), 262(105,1,'Schlepian & Lemonsunshine',5,'2011-11-01 00:00:00'),
263(105,'Imanex & Klooger',4,'2013-08-01 00:00:00'), 263(105,1,'Imanex & Klooger',4,'2013-08-01 00:00:00'),
264(105,'DM_ & wS',3,'2014-05-01 00:00:00'), 264(105,1,'DM_ & wS',3,'2014-05-01 00:00:00'),
265(105,'DM_ & follon',2,'2015-04-01 00:00:00'), 265(105,1,'DM_ & follon',2,'2015-04-01 00:00:00'),
266(106,'Schlepian & Bananasaurus Rex',4,'2011-10-01 00:00:00'), 266(106,1,'Schlepian & Bananasaurus Rex',4,'2011-10-01 00:00:00'),
267(106,'Gig & takz',3,'2012-06-01 00:00:00'), 267(106,1,'Gig & takz',3,'2012-06-01 00:00:00'),
268(106,'Imanex & Klooger',0,'2013-06-01 00:00:00'), 268(106,1,'Imanex & Klooger',0,'2013-06-01 00:00:00'),
269(107,'Chubfish & Exhale',2,'2011-10-01 00:00:00'), 269(107,1,'Chubfish & Exhale',2,'2011-10-01 00:00:00'),
270(107,'DM_ & follon',0,'2015-04-01 00:00:00'), 270(107,1,'DM_ & follon',0,'2015-04-01 00:00:00'),
271(108,'DaFox & P',0,'2011-12-01 00:00:00'), 271(108,1,'DaFox & P',0,'2011-12-01 00:00:00'),
272(109,'Schlepian & Tyronis',5,'2011-10-01 00:00:00'), 272(109,1,'Schlepian & Tyronis',5,'2011-10-01 00:00:00'),
273(109,'Chubfish & Exhale',0,'2011-12-01 00:00:00'), 273(109,1,'Chubfish & Exhale',0,'2011-12-01 00:00:00'),
274(110,'Tyronis & mr.bob806',15,'2011-10-01 00:00:00'), 274(110,1,'Tyronis & mr.bob806',15,'2011-10-01 00:00:00'),
275(110,'Schlepian & Chubfish',6,'2011-11-01 00:00:00'), 275(110,1,'Schlepian & Chubfish',6,'2011-11-01 00:00:00'),
276(110,'00svo & z1mb0bw4y',5,'2012-08-08 00:00:00'), 276(110,1,'00svo & z1mb0bw4y',5,'2012-08-08 00:00:00'),
277(110,'00svo & z1mb0bw4y',4,'2012-08-10 00:00:00'), 277(110,1,'00svo & z1mb0bw4y',4,'2012-08-10 00:00:00'),
278(110,'Klooger & z1mb0bw4y',2,'2014-02-01 00:00:00'), 278(110,1,'Klooger & z1mb0bw4y',2,'2014-02-01 00:00:00'),
279(110,'DM_ & follon',0,'2015-04-01 00:00:00'); \ No newline at end of file 279(110,1,'DM_ & follon',0,'2015-04-01 00:00:00'); \ No newline at end of file
diff --git a/backend/database/init.sql b/backend/database/init.sql
index 871aba2..76c3aa6 100644
--- a/backend/database/init.sql
+++ b/backend/database/init.sql
@@ -54,20 +54,24 @@ CREATE TABLE map_routes (
54CREATE TABLE map_history ( 54CREATE TABLE map_history (
55 id SMALLSERIAL, 55 id SMALLSERIAL,
56 map_id SMALLINT NOT NULL, 56 map_id SMALLINT NOT NULL,
57 category_id SMALLINT NOT NULL,
57 user_name TEXT NOT NULL, 58 user_name TEXT NOT NULL,
58 score_count SMALLINT NOT NULL, 59 score_count SMALLINT NOT NULL,
59 record_date TIMESTAMP NOT NULL, 60 record_date TIMESTAMP NOT NULL,
60 PRIMARY KEY (id), 61 PRIMARY KEY (id),
62 FOREIGN KEY (category_id) REFERENCES categories(id),
61 FOREIGN KEY (map_id) REFERENCES maps(id) 63 FOREIGN KEY (map_id) REFERENCES maps(id)
62); 64);
63 65
64CREATE TABLE map_ratings ( 66CREATE TABLE map_ratings (
65 id SERIAL, 67 id SERIAL,
66 map_id SMALLINT NOT NULL, 68 map_id SMALLINT NOT NULL,
69 category_id SMALLINT NOT NULL,
67 user_id TEXT NOT NULL, 70 user_id TEXT NOT NULL,
68 rating SMALLINT NOT NULL, 71 rating SMALLINT NOT NULL,
69 PRIMARY KEY (id), 72 PRIMARY KEY (id),
70 FOREIGN KEY (map_id) REFERENCES maps(id), 73 FOREIGN KEY (map_id) REFERENCES maps(id),
74 FOREIGN KEY (category_id) REFERENCES categories(id),
71 FOREIGN KEY (user_id) REFERENCES users(steam_id) 75 FOREIGN KEY (user_id) REFERENCES users(steam_id)
72); 76);
73 77
diff --git a/backend/database/route.sql b/backend/database/route.sql
new file mode 100644
index 0000000..6f090c7
--- /dev/null
+++ b/backend/database/route.sql
@@ -0,0 +1,279 @@
1INSERT INTO map_routes(map_id,category_id,score_count,description,showcase) VALUES
2-- Portal 2 Singleplayer
3-- 1
4(3,1,3,'',''),
5(3,1,1,'',''),
6(3,1,0,'',''),
7(4,1,1,'',''),
8(4,1,0,'',''),
9(5,1,2,'',''),
10(5,1,1,'',''),
11(6,1,4,'',''),
12(6,1,3,'',''),
13(6,1,2,'',''),
14(9,1,4,'',''),
15(9,1,3,'',''),
16(9,1,2,'',''),
17(9,1,0,'',''),
18-- 2
19(10,1,2,'',''),
20(10,1,0,'',''),
21(11,1,2,'',''),
22(11,1,0,'',''),
23(12,1,2,'',''),
24(13,1,3,'',''),
25(13,1,2,'',''),
26(13,1,0,'',''),
27(15,1,2,'',''),
28(16,1,2,'',''),
29(16,1,0,'',''),
30(17,1,0,'',''),
31(17,1,0,'',''),
32-- 3
33(18,1,5,'',''),
34(18,1,4,'',''),
35(18,1,3,'',''),
36(18,1,2,'',''),
37(18,1,0,'',''),
38(19,1,2,'',''),
39(20,1,5,'',''),
40(20,1,4,'',''),
41(20,1,3,'',''),
42(20,1,2,'',''),
43(21,1,4,'',''),
44(21,1,2,'',''),
45(21,1,0,'',''),
46(22,1,0,'',''),
47(23,1,2,'',''),
48(23,1,0,'',''),
49(24,1,0,'',''),
50(25,1,0,'',''),
51(26,1,3,'',''),
52(26,1,2,'',''),
53(26,1,0,'',''),
54-- 4
55(27,1,2,'',''),
56(27,1,0,'',''),
57(28,1,7,'',''),
58(28,1,2,'',''),
59(28,1,0,'',''),
60(29,1,0,'',''),
61(30,1,2,'',''),
62(31,1,0,'',''),
63-- 5
64(32,1,6,'',''),
65(32,1,5,'',''),
66(33,1,7,'',''),
67(33,1,5,'',''),
68(33,1,4,'',''),
69(34,1,3,'',''),
70(34,1,2,'',''),
71(34,1,0,'',''),
72(35,1,2,'',''),
73-- 6
74(36,1,6,'',''),
75(36,1,5,'',''),
76(36,1,4,'',''),
77(36,1,2,'',''),
78(37,1,7,'',''),
79(37,1,6,'',''),
80(37,1,5,'',''),
81(37,1,4,'',''),
82(38,1,2,'',''),
83(38,1,0,'',''),
84(39,1,6,'',''),
85(39,1,5,'',''),
86(39,1,4,'',''),
87(39,1,3,'',''),
88(40,1,7,'',''),
89(40,1,6,'',''),
90(40,1,4,'',''),
91(40,1,3,'',''),
92(40,1,2,'',''),
93(40,1,0,'',''),
94(41,1,7,'',''),
95(41,1,6,'',''),
96(41,1,5,'',''),
97-- 7
98(42,1,4,'',''),
99(42,1,2,'',''),
100(43,1,5,'',''),
101(43,1,2,'',''),
102(43,1,0,'',''),
103(44,1,18,'',''),
104(44,1,13,'',''),
105(44,1,12,'',''),
106(44,1,11,'',''),
107(44,1,9,'',''),
108(45,1,23,'',''),
109(45,1,22,'',''),
110(45,1,17,'',''),
111(45,1,16,'',''),
112(45,1,15,'',''),
113(45,1,12,'',''),
114(45,1,10,'',''),
115(45,1,7,'',''),
116(45,1,4,'',''),
117-- 8
118(46,1,6,'',''),
119(46,1,2,'',''),
120(47,1,2,'',''),
121(47,1,0,'',''),
122(48,1,5,'',''),
123(48,1,2,'',''),
124(48,1,0,'',''),
125(49,1,4,'',''),
126(49,1,2,'',''),
127(49,1,0,'',''),
128(50,1,4,'',''),
129(50,1,2,'',''),
130(50,1,0,'',''),
131(51,1,3,'',''),
132(51,1,2,'',''),
133(52,1,0,'',''),
134(53,1,9,'',''),
135(53,1,2,'',''),
136(53,1,0,'',''),
137(54,1,7,'',''),
138(54,1,6,'',''),
139(54,1,5,'',''),
140(54,1,4,'',''),
141(54,1,3,'',''),
142(55,1,7,'',''),
143(55,1,3,'',''),
144(55,1,2,'',''),
145(55,1,0,'',''),
146(56,1,9,'',''),
147(56,1,5,'',''),
148(56,1,4,'',''),
149(56,1,2,'',''),
150-- 9
151(57,1,7,'',''),
152(57,1,5,'',''),
153(57,1,0,'',''),
154(58,1,2,'',''),
155(59,1,7,'',''),
156(59,1,6,'',''),
157(60,1,7,'',''),
158(60,1,6,'',''),
159-- Portal 2 Cooperative
160-- 1
161(63,1,0,'',''),
162(64,1,3,'',''),
163(64,1,2,'',''),
164(65,1,4,'',''),
165(65,1,3,'',''),
166(66,1,3,'',''),
167(66,1,2,'',''),
168(67,1,0,'',''),
169(68,1,0,'',''),
170-- 2
171(69,1,4,'',''),
172(70,1,6,'',''),
173(70,1,4,'',''),
174(70,1,2,'',''),
175(70,1,0,'',''),
176(71,1,3,'',''),
177(71,1,0,'',''),
178(72,1,4,'',''),
179(72,1,2,'',''),
180(73,1,9,'',''),
181(73,1,8,'',''),
182(73,1,7,'',''),
183(73,1,6,'',''),
184(73,1,4,'',''),
185(74,1,5,'',''),
186(74,1,7,'',''),
187(74,1,3,'',''),
188(74,1,2,'',''),
189(75,1,5,'',''),
190(75,1,4,'',''),
191(75,1,2,'',''),
192(75,1,0,'',''),
193(76,1,3,'',''),
194(76,1,0,'',''),
195-- 3
196(77,1,3,'',''),
197(78,1,4,'',''),
198(78,1,3,'',''),
199(78,1,2,'',''),
200(79,1,5,'',''),
201(79,1,4,'',''),
202(79,1,2,'',''),
203(80,1,5,'',''),
204(80,1,4,'',''),
205(81,1,7,'',''),
206(81,1,6,'',''),
207(81,1,5,'',''),
208(81,1,4,'',''),
209(82,1,4,'',''),
210(83,1,5,'',''),
211(83,1,2,'',''),
212(83,1,0,'',''),
213(84,1,6,'',''),
214(84,1,4,'',''),
215(84,1,2,'',''),
216(84,1,0,'',''),
217-- 4
218(85,1,3,'',''),
219(85,1,0,'',''),
220(86,1,3,'',''),
221(86,1,0,'',''),
222(87,1,3,'',''),
223(87,1,2,'',''),
224(87,1,0,'',''),
225(88,1,4,'',''),
226(88,1,0,'',''),
227(89,1,0,'',''),
228(90,1,4,'',''),
229(90,1,2,'',''),
230(90,1,0,'',''),
231(91,1,2,'',''),
232(91,1,0,'',''),
233(92,1,5,'',''),
234(92,1,4,'',''),
235(92,1,2,'',''),
236(92,1,0,'',''),
237(93,1,2,'',''),
238(93,1,0,'',''),
239-- 5
240(94,1,2,'',''),
241(94,1,0,'',''),
242(95,1,2,'',''),
243(96,1,4,'',''),
244(96,1,2,'',''),
245(97,1,7,'',''),
246(97,1,4,'',''),
247(97,1,2,'',''),
248(98,1,0,'',''),
249(99,1,3,'',''),
250(99,1,2,'',''),
251(99,1,0,'',''),
252(100,1,0,'',''),
253(101,1,2,'',''),
254(101,1,0,'',''),
255-- 6
256(102,1,3,'',''),
257(102,1,2,'',''),
258(102,1,0,'',''),
259(103,1,0,'',''),
260(104,1,0,'',''),
261(105,1,8,'',''),
262(105,1,5,'',''),
263(105,1,4,'',''),
264(105,1,3,'',''),
265(105,1,2,'',''),
266(106,1,4,'',''),
267(106,1,3,'',''),
268(106,1,0,'',''),
269(107,1,2,'',''),
270(107,1,0,'',''),
271(108,1,0,'',''),
272(109,1,5,'',''),
273(109,1,0,'',''),
274(110,1,15,'',''),
275(110,1,6,'',''),
276(110,1,5,'',''),
277(110,1,4,'',''),
278(110,1,2,'',''),
279(110,1,0,'',''); \ No newline at end of file
diff --git a/backend/models/models.go b/backend/models/models.go
index 5c9b8f8..783c339 100644
--- a/backend/models/models.go
+++ b/backend/models/models.go
@@ -31,9 +31,7 @@ type MapShort struct {
31} 31}
32 32
33type MapSummary struct { 33type MapSummary struct {
34 Rating float32 `json:"rating"` 34 Routes []MapRoute `json:"routes"`
35 History []MapHistory `json:"history"`
36 Routes []MapRoute `json:"routes"`
37} 35}
38 36
39type MapHistory struct { 37type MapHistory struct {
@@ -43,10 +41,12 @@ type MapHistory struct {
43} 41}
44 42
45type MapRoute struct { 43type MapRoute struct {
46 Category Category `json:"category"` 44 Category Category `json:"category"`
47 ScoreCount int `json:"score_count"` 45 History MapHistory `json:"history"`
48 Description string `json:"description"` 46 Rating float32 `json:"rating"`
49 Showcase string `json:"showcase"` 47 ScoreCount int `json:"score_count"`
48 Description string `json:"description"`
49 Showcase string `json:"showcase"`
50} 50}
51 51
52type MapRecords struct { 52type MapRecords struct {