diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-31 15:14:12 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-31 15:14:12 +0200 |
| commit | 59d82d6c68ae3e75c3a4d9408238c44640e587db (patch) | |
| tree | 9aa61cd679bed9829c0637c5832265c59a77d031 /models | |
| parent | 37c16ecf9fd64fc7644e82d8619584d0f64d694e (diff) | |
| download | processor-59d82d6c68ae3e75c3a4d9408238c44640e587db.tar.gz processor-59d82d6c68ae3e75c3a4d9408238c44640e587db.zip | |
regenerate model from releases/2.0.0 db schema
Diffstat (limited to 'models')
| -rw-r--r-- | models/asset.js | 25 | ||||
| -rw-r--r-- | models/gamer.js | 41 | ||||
| -rw-r--r-- | models/hero_core_stats.js | 7 | ||||
| -rw-r--r-- | models/hero_dimension.js | 5 | ||||
| -rw-r--r-- | models/hero_stats.js | 5 | ||||
| -rw-r--r-- | models/heros.js | 5 | ||||
| -rw-r--r-- | models/item.js | 7 | ||||
| -rw-r--r-- | models/keys.js | 5 | ||||
| -rw-r--r-- | models/match.js | 22 | ||||
| -rw-r--r-- | models/match_dimension.js | 30 | ||||
| -rw-r--r-- | models/match_ext.js | 52 | ||||
| -rw-r--r-- | models/match_stats.js | 14 | ||||
| -rw-r--r-- | models/migrations.js | 5 | ||||
| -rw-r--r-- | models/participant.js | 24 | ||||
| -rw-r--r-- | models/participant_ext.js | 7 | ||||
| -rw-r--r-- | models/participant_item_use.js | 9 | ||||
| -rw-r--r-- | models/player.js | 16 | ||||
| -rw-r--r-- | models/player_dimension.js | 5 | ||||
| -rw-r--r-- | models/player_ext.js | 11 | ||||
| -rw-r--r-- | models/player_stats.js | 33 | ||||
| -rw-r--r-- | models/roster.js | 11 | ||||
| -rw-r--r-- | models/roster_ext.js | 53 | ||||
| -rw-r--r-- | models/stats_dimensions.js | 5 |
23 files changed, 307 insertions, 90 deletions
diff --git a/models/asset.js b/models/asset.js new file mode 100644 index 0000000..54a9a82 --- /dev/null +++ b/models/asset.js @@ -0,0 +1,25 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('asset', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + type: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'asset', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/gamer.js b/models/gamer.js new file mode 100644 index 0000000..d88484c --- /dev/null +++ b/models/gamer.js @@ -0,0 +1,41 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('gamer', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + player_api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + vainsocial_status: { + type: DataTypes.STRING(191), + allowNull: true + }, + vainglory_ign: { + type: DataTypes.STRING(191), + allowNull: true + }, + vainglory_shard_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + vainglory_is_pro: { + type: DataTypes.INTEGER(1), + allowNull: true + } + }, { + tableName: 'gamer', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/hero_core_stats.js b/models/hero_core_stats.js index 1accc6a..bc709af 100644 --- a/models/hero_core_stats.js +++ b/models/hero_core_stats.js @@ -16,7 +16,7 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.TIME, allowNull: true }, - patch_version: { + series: { type: DataTypes.STRING(191), allowNull: false }, @@ -61,6 +61,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'hero_core_stats' + tableName: 'hero_core_stats', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/hero_dimension.js b/models/hero_dimension.js index 300ea69..c5af060 100644 --- a/models/hero_dimension.js +++ b/models/hero_dimension.js @@ -25,6 +25,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'hero_dimension' + tableName: 'hero_dimension', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/hero_stats.js b/models/hero_stats.js index 514f141..c79ea4f 100644 --- a/models/hero_stats.js +++ b/models/hero_stats.js @@ -33,6 +33,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'hero_stats' + tableName: 'hero_stats', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/heros.js b/models/heros.js index 9848656..5260ee7 100644 --- a/models/heros.js +++ b/models/heros.js @@ -77,6 +77,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'heros' + tableName: 'heros', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/item.js b/models/item.js index b3fbbf3..6f2aac9 100644 --- a/models/item.js +++ b/models/item.js @@ -16,7 +16,7 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.TIME, allowNull: true }, - patch_version: { + series: { type: DataTypes.STRING(191), allowNull: false }, @@ -33,6 +33,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'item' + tableName: 'item', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/keys.js b/models/keys.js index 96ff65b..0ba17f0 100644 --- a/models/keys.js +++ b/models/keys.js @@ -29,6 +29,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'keys' + tableName: 'keys', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/match.js b/models/match.js index 8372d97..46c4f80 100644 --- a/models/match.js +++ b/models/match.js @@ -13,8 +13,16 @@ module.exports = function(sequelize, DataTypes) { allowNull: false, unique: true }, + shard_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + series: { + type: DataTypes.STRING(191), + allowNull: true + }, created_at: { - type: DataTypes.DATE, + type: DataTypes.TIME, allowNull: false, defaultValue: sequelize.literal('CURRENT_TIMESTAMP') }, @@ -26,14 +34,6 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.STRING(191), allowNull: false }, - series: { - type: DataTypes.STRING(191), - allowNull: true - }, - shard_id: { - type: DataTypes.STRING(191), - allowNull: false - }, end_game_reason: { type: DataTypes.STRING(191), allowNull: false @@ -44,6 +44,8 @@ module.exports = function(sequelize, DataTypes) { } }, { tableName: 'match', - timestamps: false + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/match_dimension.js b/models/match_dimension.js deleted file mode 100644 index c6c0c45..0000000 --- a/models/match_dimension.js +++ /dev/null @@ -1,30 +0,0 @@ -/* jshint indent: 2 */ - -module.exports = function(sequelize, DataTypes) { - return sequelize.define('match_dimension', { - id: { - type: DataTypes.INTEGER(10).UNSIGNED, - allowNull: false, - primaryKey: true, - autoIncrement: true - }, - match_id: { - type: DataTypes.INTEGER(11), - allowNull: false - }, - dimension_id: { - type: DataTypes.INTEGER(11), - allowNull: false - }, - stats_id: { - type: DataTypes.INTEGER(11), - allowNull: false - }, - computed_on: { - type: DataTypes.DATE, - allowNull: false - } - }, { - tableName: 'match_dimension' - }); -}; diff --git a/models/match_ext.js b/models/match_ext.js new file mode 100644 index 0000000..01d6f6a --- /dev/null +++ b/models/match_ext.js @@ -0,0 +1,52 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('match_ext', { + id: { + type: DataTypes.STRING(191), + allowNull: false + }, + match_api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + winning_side: { + type: DataTypes.STRING(191), + allowNull: true + }, + total_kills: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + kraken_captures: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + gold: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + aces_earned: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + turret_captures: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + gold_mine_captures: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + crystal_miner_captures: { + type: DataTypes.INTEGER(11), + allowNull: true + } + }, { + tableName: 'match_ext', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/match_stats.js b/models/match_stats.js deleted file mode 100644 index 1317cf3..0000000 --- a/models/match_stats.js +++ /dev/null @@ -1,14 +0,0 @@ -/* jshint indent: 2 */ - -module.exports = function(sequelize, DataTypes) { - return sequelize.define('match_stats', { - id: { - type: DataTypes.INTEGER(10).UNSIGNED, - allowNull: false, - primaryKey: true, - autoIncrement: true - } - }, { - tableName: 'match_stats' - }); -}; diff --git a/models/migrations.js b/models/migrations.js index 5bee87e..c0b3ecf 100644 --- a/models/migrations.js +++ b/models/migrations.js @@ -17,6 +17,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'migrations' + tableName: 'migrations', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/participant.js b/models/participant.js index d48874b..9bd1ff7 100644 --- a/models/participant.js +++ b/models/participant.js @@ -8,15 +8,15 @@ module.exports = function(sequelize, DataTypes) { primaryKey: true, autoIncrement: true }, + shard_id: { + type: DataTypes.STRING(191), + allowNull: false + }, api_id: { type: DataTypes.STRING(191), allowNull: false, unique: true }, - shard_id: { - type: DataTypes.STRING(191), - allowNull: false - }, player_api_id: { type: DataTypes.STRING(191), allowNull: false @@ -29,6 +29,10 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.TIME, allowNull: true }, + series: { + type: DataTypes.TIME, + allowNull: true + }, actor: { type: DataTypes.STRING(191), allowNull: false @@ -53,6 +57,10 @@ module.exports = function(sequelize, DataTypes) { type: "DOUBLE", allowNull: false }, + gold: { + type: DataTypes.INTEGER(11), + allowNull: false + }, gold_mine_captures: { type: DataTypes.INTEGER(11), allowNull: false @@ -81,6 +89,10 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.INTEGER(11), allowNull: false }, + non_jungle_minion_kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, skill_tier: { type: DataTypes.INTEGER(11), allowNull: false @@ -103,6 +115,8 @@ module.exports = function(sequelize, DataTypes) { } }, { tableName: 'participant', - timestamps: false + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/participant_ext.js b/models/participant_ext.js index 070eb93..abcb5ed 100644 --- a/models/participant_ext.js +++ b/models/participant_ext.js @@ -8,7 +8,7 @@ module.exports = function(sequelize, DataTypes) { primaryKey: true, autoIncrement: true }, - patch_version: { + series: { type: DataTypes.STRING(191), allowNull: false }, @@ -34,6 +34,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: true } }, { - tableName: 'participant_ext' + tableName: 'participant_ext', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/participant_item_use.js b/models/participant_item_use.js index 0055650..5dc8c39 100644 --- a/models/participant_item_use.js +++ b/models/participant_item_use.js @@ -8,7 +8,7 @@ module.exports = function(sequelize, DataTypes) { primaryKey: true, autoIncrement: true }, - participant_id: { + participant_api_id: { type: DataTypes.STRING(191), allowNull: false, unique: true @@ -21,11 +21,14 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.STRING(191), allowNull: false }, - timeFromStart: { + time_from_start: { type: DataTypes.INTEGER(11), allowNull: false } }, { - tableName: 'participant_item_use' + tableName: 'participant_item_use', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/player.js b/models/player.js index af56432..827e9fc 100644 --- a/models/player.js +++ b/models/player.js @@ -8,6 +8,10 @@ module.exports = function(sequelize, DataTypes) { primaryKey: true, autoIncrement: true }, + shard_id: { + type: DataTypes.STRING(191), + allowNull: true + }, api_id: { type: DataTypes.STRING(191), allowNull: false, @@ -21,14 +25,14 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.STRING(191), allowNull: false }, - shard_id: { - type: DataTypes.STRING(191), - allowNull: false - }, last_match_created_date: { type: DataTypes.TIME, allowNull: true }, + last_update: { + type: DataTypes.TIME, + allowNull: true + }, level: { type: DataTypes.INTEGER(11), allowNull: false @@ -43,6 +47,8 @@ module.exports = function(sequelize, DataTypes) { } }, { tableName: 'player', - timestamps: false + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/player_dimension.js b/models/player_dimension.js index 40556ae..82ff7a0 100644 --- a/models/player_dimension.js +++ b/models/player_dimension.js @@ -25,6 +25,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'player_dimension' + tableName: 'player_dimension', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/player_ext.js b/models/player_ext.js index f2ca5d4..183faf9 100644 --- a/models/player_ext.js +++ b/models/player_ext.js @@ -6,15 +6,11 @@ module.exports = function(sequelize, DataTypes) { type: DataTypes.INTEGER(11), allowNull: false }, - api_id: { + player_api_id: { type: DataTypes.STRING(191), allowNull: false, unique: true }, - patch_version: { - type: DataTypes.STRING(191), - allowNull: false - }, played: { type: DataTypes.INTEGER(11), allowNull: false @@ -56,6 +52,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'player_ext' + tableName: 'player_ext', + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/player_stats.js b/models/player_stats.js new file mode 100644 index 0000000..6bbeb69 --- /dev/null +++ b/models/player_stats.js @@ -0,0 +1,33 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('player_stats', { + 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 + }, + gold_per_min: { + type: "DOUBLE(8,2)", + allowNull: false + }, + cs_per_min: { + type: "DOUBLE(8,2)", + allowNull: false + } + }, { + tableName: 'player_stats', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/roster.js b/models/roster.js index f196f0f..53a4411 100644 --- a/models/roster.js +++ b/models/roster.js @@ -8,7 +8,7 @@ module.exports = function(sequelize, DataTypes) { primaryKey: true, autoIncrement: true }, - match_api_id: { + shard_id: { type: DataTypes.STRING(191), allowNull: false }, @@ -17,7 +17,7 @@ module.exports = function(sequelize, DataTypes) { allowNull: false, unique: true }, - shard_id: { + match_api_id: { type: DataTypes.STRING(191), allowNull: false }, @@ -42,7 +42,8 @@ module.exports = function(sequelize, DataTypes) { allowNull: false }, team_color: { - type: DataTypes.STRING(191) + type: DataTypes.STRING(191), + allowNull: false }, turret_kills: { type: DataTypes.INTEGER(11), @@ -54,6 +55,8 @@ module.exports = function(sequelize, DataTypes) { } }, { tableName: 'roster', - timestamps: false + timestamps: false, + underscored: true, + freezeTableName: true }); }; diff --git a/models/roster_ext.js b/models/roster_ext.js new file mode 100644 index 0000000..1f7c37d --- /dev/null +++ b/models/roster_ext.js @@ -0,0 +1,53 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('roster_ext', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + roster_api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + assists: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + deaths: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + gold: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + kraken_captures: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + side: { + type: DataTypes.STRING(191), + allowNull: false + }, + turret_captures: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + turrets_remaining: { + type: DataTypes.INTEGER(11), + allowNull: false + } + }, { + tableName: 'roster_ext', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/stats_dimensions.js b/models/stats_dimensions.js index c299a2c..0aa6ef3 100644 --- a/models/stats_dimensions.js +++ b/models/stats_dimensions.js @@ -21,6 +21,9 @@ module.exports = function(sequelize, DataTypes) { allowNull: false } }, { - tableName: 'stats_dimensions' + tableName: 'stats_dimensions', + timestamps: false, + underscored: true, + freezeTableName: true }); }; |
