diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-31 20:51:04 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-31 20:51:04 +0200 |
| commit | be4e78d7b769b9798fa7938909e4ee9fbba3977e (patch) | |
| tree | fd298bc34bca884173e3f3b8ad468f038ca7af32 /models | |
| download | orm-be4e78d7b769b9798fa7938909e4ee9fbba3977e.tar.gz orm-be4e78d7b769b9798fa7938909e4ee9fbba3977e.zip | |
move ORM model into seperate repo
Diffstat (limited to 'models')
| -rw-r--r-- | models/asset.js | 50 | ||||
| -rw-r--r-- | models/gamer.js | 41 | ||||
| -rw-r--r-- | models/hero_core_stats.js | 69 | ||||
| -rw-r--r-- | models/hero_dimension.js | 33 | ||||
| -rw-r--r-- | models/hero_stats.js | 41 | ||||
| -rw-r--r-- | models/heros.js | 85 | ||||
| -rw-r--r-- | models/item.js | 41 | ||||
| -rw-r--r-- | models/keys.js | 37 | ||||
| -rw-r--r-- | models/match.js | 50 | ||||
| -rw-r--r-- | models/match_ext.js | 52 | ||||
| -rw-r--r-- | models/migrations.js | 25 | ||||
| -rw-r--r-- | models/participant.js | 122 | ||||
| -rw-r--r-- | models/participant_ext.js | 42 | ||||
| -rw-r--r-- | models/participant_item_use.js | 34 | ||||
| -rw-r--r-- | models/player.js | 54 | ||||
| -rw-r--r-- | models/player_dimension.js | 33 | ||||
| -rw-r--r-- | models/player_ext.js | 60 | ||||
| -rw-r--r-- | models/player_stats.js | 33 | ||||
| -rw-r--r-- | models/roster.js | 58 | ||||
| -rw-r--r-- | models/roster_ext.js | 53 | ||||
| -rw-r--r-- | models/stats_dimensions.js | 29 |
21 files changed, 1042 insertions, 0 deletions
diff --git a/models/asset.js b/models/asset.js new file mode 100644 index 0000000..af8d040 --- /dev/null +++ b/models/asset.js @@ -0,0 +1,50 @@ +/* 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, + unique: true + }, + match_api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + url: { + type: DataTypes.STRING(191), + allowNull: false + }, + content_type: { + type: DataTypes.STRING(191), + allowNull: false + }, + created_at: { + type: DataTypes.TIME, + allowNull: false + }, + description: { + type: DataTypes.STRING(191), + allowNull: false + }, + filename: { + type: DataTypes.STRING(191), + allowNull: false + }, + name: { + 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 new file mode 100644 index 0000000..bc709af --- /dev/null +++ b/models/hero_core_stats.js @@ -0,0 +1,69 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('hero_core_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 + }, + series: { + type: DataTypes.STRING(191), + allowNull: false + }, + hp: { + type: "DOUBLE", + allowNull: false + }, + energy: { + type: "DOUBLE", + allowNull: false + }, + weapon_damage: { + type: "DOUBLE", + allowNull: false + }, + attack_speed: { + type: "DOUBLE", + allowNull: false + }, + armor: { + type: "DOUBLE", + allowNull: false + }, + shield: { + type: "DOUBLE", + allowNull: false + }, + attack_range: { + type: "DOUBLE", + allowNull: false + }, + move_speed: { + type: "DOUBLE", + allowNull: false + }, + hp_regen: { + type: "DOUBLE", + allowNull: false + }, + ep_regen: { + type: "DOUBLE", + allowNull: false + } + }, { + tableName: 'hero_core_stats', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/hero_dimension.js b/models/hero_dimension.js new file mode 100644 index 0000000..c5af060 --- /dev/null +++ b/models/hero_dimension.js @@ -0,0 +1,33 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('hero_dimension', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + hero_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: 'hero_dimension', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/hero_stats.js b/models/hero_stats.js new file mode 100644 index 0000000..c79ea4f --- /dev/null +++ b/models/hero_stats.js @@ -0,0 +1,41 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('hero_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 + }, + pick_rate: { + type: "DOUBLE(8,2)", + allowNull: false + }, + win_rate: { + type: "DOUBLE(8,2)", + allowNull: false + }, + gold_per_min: { + type: "DOUBLE(8,2)", + allowNull: false + }, + cs_per_min: { + type: "DOUBLE(8,2)", + allowNull: false + } + }, { + tableName: 'hero_stats', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/heros.js b/models/heros.js new file mode 100644 index 0000000..5260ee7 --- /dev/null +++ b/models/heros.js @@ -0,0 +1,85 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('heros', { + 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 + }, + added_in_patch: { + type: DataTypes.STRING(191), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + api_name: { + type: DataTypes.STRING(191), + allowNull: false + }, + is_assassin: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + is_mage: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + is_protector: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + is_sniper: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + is_warrior: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + is_carry: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + is_jungler: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + is_captain: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + heroic_perk: { + type: DataTypes.STRING(191), + allowNull: false + }, + ability_a: { + type: DataTypes.STRING(191), + allowNull: false + }, + ability_b: { + type: DataTypes.STRING(191), + allowNull: false + }, + ability_c: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'heros', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/item.js b/models/item.js new file mode 100644 index 0000000..6f2aac9 --- /dev/null +++ b/models/item.js @@ -0,0 +1,41 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('item', { + 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 + }, + series: { + type: DataTypes.STRING(191), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + active: { + type: DataTypes.STRING(191), + allowNull: false + }, + passive: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'item', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/keys.js b/models/keys.js new file mode 100644 index 0000000..0ba17f0 --- /dev/null +++ b/models/keys.js @@ -0,0 +1,37 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('keys', { + 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 + }, + type: { + type: DataTypes.STRING(191), + allowNull: false + }, + key: { + type: DataTypes.STRING(191), + allowNull: false + }, + value: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'keys', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/match.js b/models/match.js new file mode 100644 index 0000000..ec5bdab --- /dev/null +++ b/models/match.js @@ -0,0 +1,50 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('match', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + shard_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + series: { + type: DataTypes.STRING(191), + allowNull: true + }, + created_at: { + type: DataTypes.TIME, + allowNull: false + }, + duration: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + game_mode: { + type: DataTypes.STRING(191), + allowNull: false + }, + end_game_reason: { + type: DataTypes.STRING(191), + allowNull: false + }, + queue: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'match', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; 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/migrations.js b/models/migrations.js new file mode 100644 index 0000000..c0b3ecf --- /dev/null +++ b/models/migrations.js @@ -0,0 +1,25 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('migrations', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + migration: { + type: DataTypes.STRING(191), + allowNull: false + }, + batch: { + type: DataTypes.INTEGER(11), + allowNull: false + } + }, { + tableName: 'migrations', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/participant.js b/models/participant.js new file mode 100644 index 0000000..9c17e74 --- /dev/null +++ b/models/participant.js @@ -0,0 +1,122 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('participant', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + shard_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + player_api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + roster_api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + created_at: { + type: DataTypes.TIME, + allowNull: true + }, + series: { + type: DataTypes.TIME, + allowNull: true + }, + actor: { + type: DataTypes.STRING(191), + allowNull: false + }, + assists: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + crystal_mine_captures: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + deaths: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + farm: { + type: "DOUBLE", + allowNull: false + }, + first_afk_time: { + type: "DOUBLE", + allowNull: false + }, + gold: { + type: DataTypes.INTEGER(11), + allowNull: true + }, + gold_mine_captures: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + jungle_kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + karma_level: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + kraken_captures: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + level: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + minion_kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + non_jungle_minion_kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + skill_tier: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + skin_key: { + type: DataTypes.STRING(191), + allowNull: false + }, + turret_captures: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + went_afk: { + type: DataTypes.INTEGER(1), + allowNull: false + }, + winner: { + type: DataTypes.INTEGER(1), + allowNull: false + } + }, { + tableName: 'participant', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/participant_ext.js b/models/participant_ext.js new file mode 100644 index 0000000..abcb5ed --- /dev/null +++ b/models/participant_ext.js @@ -0,0 +1,42 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('participant_ext', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + series: { + type: DataTypes.STRING(191), + allowNull: false + }, + participant_api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + role: { + type: DataTypes.STRING(191), + allowNull: true + }, + score: { + type: "DOUBLE(8,2)", + allowNull: true + }, + kda: { + type: "DOUBLE(8,2)", + allowNull: true + }, + kills_participation: { + type: "DOUBLE(8,2)", + allowNull: true + } + }, { + tableName: 'participant_ext', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/participant_item_use.js b/models/participant_item_use.js new file mode 100644 index 0000000..5dc8c39 --- /dev/null +++ b/models/participant_item_use.js @@ -0,0 +1,34 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('participant_item_use', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + participant_api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + item_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + action: { + type: DataTypes.STRING(191), + allowNull: false + }, + time_from_start: { + type: DataTypes.INTEGER(11), + allowNull: false + } + }, { + tableName: 'participant_item_use', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/player.js b/models/player.js new file mode 100644 index 0000000..827e9fc --- /dev/null +++ b/models/player.js @@ -0,0 +1,54 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('player', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + shard_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + created_at: { + type: DataTypes.TIME, + allowNull: true + }, + name: { + 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 + }, + xp: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + lifetime_gold: { + type: "DOUBLE(8,2)", + allowNull: false + } + }, { + tableName: 'player', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/player_dimension.js b/models/player_dimension.js new file mode 100644 index 0000000..82ff7a0 --- /dev/null +++ b/models/player_dimension.js @@ -0,0 +1,33 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('player_dimension', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + player_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: 'player_dimension', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; diff --git a/models/player_ext.js b/models/player_ext.js new file mode 100644 index 0000000..183faf9 --- /dev/null +++ b/models/player_ext.js @@ -0,0 +1,60 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('player_ext', { + id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + player_api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + played: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + played_ranked: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + played_casual: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + played_brawl: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + wins: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + wins_ranked: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + wins_casual: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + wins_brawl: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + skill_tier: { + type: DataTypes.STRING(191), + allowNull: true + }, + streak: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + 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 new file mode 100644 index 0000000..3848c6a --- /dev/null +++ b/models/roster.js @@ -0,0 +1,58 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('roster', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + shard_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: false, + unique: true + }, + match_api_id: { + type: DataTypes.STRING(191), + allowNull: false + }, + aces_earned: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + gold: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + hero_kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + kraken_captures: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + side: { + type: DataTypes.STRING(191), + allowNull: false + }, + turret_kills: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + turrets_remaining: { + type: DataTypes.INTEGER(11), + allowNull: false + } + }, { + tableName: 'roster', + 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 new file mode 100644 index 0000000..0aa6ef3 --- /dev/null +++ b/models/stats_dimensions.js @@ -0,0 +1,29 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('stats_dimensions', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + dimension_on: { + type: DataTypes.STRING(191), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + value: { + type: DataTypes.STRING(191), + allowNull: false + } + }, { + tableName: 'stats_dimensions', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; |
