summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-05-15 13:03:20 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-05-15 13:03:20 +0200
commit3948fe1ad7e651a0f6c7e6922f1f159518e37dd1 (patch)
treef35e7876369690b4f13dbd5564b75ac8e4bf179c
parentd14ebf9491391366dd07104ddecaf95f0b08c00b (diff)
downloadorm-3948fe1ad7e651a0f6c7e6922f1f159518e37dd1.tar.gz
orm-3948fe1ad7e651a0f6c7e6922f1f159518e37dd1.zip
add participant_phases; extend shard id length
-rw-r--r--models/asset.js2
-rw-r--r--models/game_mode.js2
-rw-r--r--models/match.js2
-rw-r--r--models/participant.js2
-rw-r--r--models/participant_phases.js185
-rw-r--r--models/participant_stats.js13
-rw-r--r--models/player.js2
-rw-r--r--models/roster.js2
-rw-r--r--models/team.js2
-rw-r--r--models/team_membership.js2
10 files changed, 201 insertions, 13 deletions
diff --git a/models/asset.js b/models/asset.js
index ae939a0..1f51ef6 100644
--- a/models/asset.js
+++ b/models/asset.js
@@ -14,7 +14,7 @@ module.exports = function(sequelize, DataTypes) {
unique: true
},
shard_id: {
- type: DataTypes.STRING(5),
+ type: DataTypes.STRING(191),
allowNull: false
},
match_api_id: {
diff --git a/models/game_mode.js b/models/game_mode.js
index 5eb1a91..06ec06d 100644
--- a/models/game_mode.js
+++ b/models/game_mode.js
@@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) {
autoIncrement: true
},
name: {
- type: DataTypes.STRING(16),
+ type: DataTypes.STRING(25),
allowNull: false,
unique: true
}
diff --git a/models/match.js b/models/match.js
index 0b9f6d9..a8d78bf 100644
--- a/models/match.js
+++ b/models/match.js
@@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) {
autoIncrement: true
},
shard_id: {
- type: DataTypes.STRING(5),
+ type: DataTypes.STRING(191),
allowNull: false
},
api_id: {
diff --git a/models/participant.js b/models/participant.js
index caa8c80..b5166b3 100644
--- a/models/participant.js
+++ b/models/participant.js
@@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) {
autoIncrement: true
},
shard_id: {
- type: DataTypes.STRING(5),
+ type: DataTypes.STRING(191),
allowNull: false
},
api_id: {
diff --git a/models/participant_phases.js b/models/participant_phases.js
new file mode 100644
index 0000000..876dec3
--- /dev/null
+++ b/models/participant_phases.js
@@ -0,0 +1,185 @@
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+ return sequelize.define('participant_phases', {
+ id: {
+ type: DataTypes.INTEGER(10).UNSIGNED,
+ allowNull: false,
+ primaryKey: true,
+ autoIncrement: true
+ },
+ created_at: {
+ type: DataTypes.TIME,
+ allowNull: true
+ },
+ updated_at: {
+ type: DataTypes.TIME,
+ allowNull: true
+ },
+ duration: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: false
+ },
+ participant_api_id: {
+ type: DataTypes.CHAR(36),
+ allowNull: false
+ },
+ kills: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ deaths: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ assists: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ farm: {
+ type: DataTypes.INTEGER(8).UNSIGNED,
+ allowNull: true
+ },
+ minion_kills: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ jungle_kills: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ non_jungle_minion_kills: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ crystal_mine_captures: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ gold_mine_captures: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ kraken_captures: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ turret_captures: {
+ type: DataTypes.INTEGER(5).UNSIGNED,
+ allowNull: true
+ },
+ gold: {
+ type: DataTypes.INTEGER(8).UNSIGNED,
+ allowNull: true
+ },
+ hero_dps: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ non_hero_dps: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ hero_level: {
+ type: DataTypes.INTEGER(3).UNSIGNED,
+ allowNull: true
+ },
+ kda_ratio: {
+ type: "DOUBLE(5,5)",
+ allowNull: true
+ },
+ kill_participation: {
+ type: "DOUBLE(5,5)",
+ allowNull: true
+ },
+ cs_per_min: {
+ type: "DOUBLE(7,5)",
+ allowNull: true
+ },
+ kills_per_min: {
+ type: "DOUBLE(6,5)",
+ allowNull: true
+ },
+ impact_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ objective_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ damage_cp_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ damage_wp_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ sustain_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ farm_lane_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ kill_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ objective_lane_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ farm_jungle_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ peel_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ kill_assist_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ objective_jungle_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ vision_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ heal_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ assist_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ utility_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ synergy_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ build_score: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ offmeta_score: {
+ type: "DOUBLE",
+ allowNull: true
+ }
+ }, {
+ tableName: 'participant_phases',
+ timestamps: false,
+ underscored: true,
+ freezeTableName: true
+ });
+};
diff --git a/models/participant_stats.js b/models/participant_stats.js
index 6b2c9a9..ebb4585 100644
--- a/models/participant_stats.js
+++ b/models/participant_stats.js
@@ -16,11 +16,6 @@ module.exports = function(sequelize, DataTypes) {
type: DataTypes.TIME,
allowNull: true
},
- final: {
- type: DataTypes.INTEGER(1),
- allowNull: false,
- defaultValue: "1"
- },
participant_api_id: {
type: DataTypes.CHAR(36),
allowNull: false
@@ -188,6 +183,14 @@ module.exports = function(sequelize, DataTypes) {
duration: {
type: DataTypes.INTEGER(5).UNSIGNED,
allowNull: false
+ },
+ hero_dps: {
+ type: "DOUBLE",
+ allowNull: true
+ },
+ non_hero_dps: {
+ type: "DOUBLE",
+ allowNull: true
}
}, {
tableName: 'participant_stats',
diff --git a/models/player.js b/models/player.js
index 967691c..6df229f 100644
--- a/models/player.js
+++ b/models/player.js
@@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) {
autoIncrement: true
},
shard_id: {
- type: DataTypes.STRING(5),
+ type: DataTypes.STRING(191),
allowNull: false
},
api_id: {
diff --git a/models/roster.js b/models/roster.js
index 8e7aeb6..d4b34e0 100644
--- a/models/roster.js
+++ b/models/roster.js
@@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) {
autoIncrement: true
},
shard_id: {
- type: DataTypes.STRING(5),
+ type: DataTypes.STRING(191),
allowNull: false
},
api_id: {
diff --git a/models/team.js b/models/team.js
index c9a7880..c0830b8 100644
--- a/models/team.js
+++ b/models/team.js
@@ -9,7 +9,7 @@ module.exports = function(sequelize, DataTypes) {
autoIncrement: true
},
shard_id: {
- type: DataTypes.STRING(5),
+ type: DataTypes.STRING(191),
allowNull: true
},
api_id: {
diff --git a/models/team_membership.js b/models/team_membership.js
index 502c2df..755e7bc 100644
--- a/models/team_membership.js
+++ b/models/team_membership.js
@@ -26,7 +26,7 @@ module.exports = function(sequelize, DataTypes) {
defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
},
status: {
- type: DataTypes.ENUM('pending','initiate','member','officer','leader','former'),
+ type: DataTypes.ENUM('pending','initiate','member','officer','leader','former','veteran'),
allowNull: false
},
fame: {