mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
feat: add towers field to match_teams table
This commit is contained in:
parent
ed79b4cd7c
commit
2f677ab17b
3 changed files with 5 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ export default class MatchTeam extends BaseModel {
|
||||||
@column()
|
@column()
|
||||||
public riftHeralds: number
|
public riftHeralds: number
|
||||||
|
|
||||||
|
@column()
|
||||||
|
public towers: number
|
||||||
|
|
||||||
@column()
|
@column()
|
||||||
public bans?: number[]
|
public bans?: number[]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ class MatchParser {
|
||||||
dragons: team.objectives.dragon.kills,
|
dragons: team.objectives.dragon.kills,
|
||||||
inhibitors: team.objectives.inhibitor.kills,
|
inhibitors: team.objectives.inhibitor.kills,
|
||||||
riftHeralds: team.objectives.riftHerald.kills,
|
riftHeralds: team.objectives.riftHerald.kills,
|
||||||
|
towers: team.objectives.tower.kills,
|
||||||
bans: team.bans.length ? team.bans.map((ban) => ban.championId) : undefined,
|
bans: team.bans.length ? team.bans.map((ban) => ban.championId) : undefined,
|
||||||
banOrders: team.bans.length ? team.bans.map((ban) => ban.pickTurn) : undefined,
|
banOrders: team.bans.length ? team.bans.map((ban) => ban.pickTurn) : undefined,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ export default class MatchTeams extends BaseSchema {
|
||||||
table.integer('dragons').notNullable()
|
table.integer('dragons').notNullable()
|
||||||
table.integer('inhibitors').notNullable()
|
table.integer('inhibitors').notNullable()
|
||||||
table.integer('rift_heralds').notNullable()
|
table.integer('rift_heralds').notNullable()
|
||||||
|
table.integer('towers').notNullable()
|
||||||
|
|
||||||
table.specificType('bans', 'INT[]').nullable()
|
table.specificType('bans', 'INT[]').nullable()
|
||||||
table.specificType('ban_orders', 'INT[]').nullable()
|
table.specificType('ban_orders', 'INT[]').nullable()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue