add model
This commit is contained in:
+133
-46
@@ -1,47 +1,129 @@
|
|||||||
import { type Generated } from 'kysely'
|
import { type Generated } from 'kysely'
|
||||||
|
|
||||||
|
interface HostTable {
|
||||||
|
host_name: string
|
||||||
|
host_id: Generated<number>
|
||||||
|
host_token: Generated<string>
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ServerTable {
|
||||||
|
server_name: string
|
||||||
|
host_id: number
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MatchTable {
|
||||||
|
match_id: Generated<number>
|
||||||
|
host_id: number
|
||||||
|
server_name: string
|
||||||
|
game_map: string
|
||||||
|
gamemode: string
|
||||||
|
air_accel: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PlayerTable {
|
||||||
|
weapon_id: string
|
||||||
|
weapon_name: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface WeaponTable {
|
||||||
|
playername: string
|
||||||
|
player_id: number
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ModsOnWeaponTable {
|
||||||
|
mod_id: number
|
||||||
|
speedloader: boolean
|
||||||
|
extra_ammo: boolean
|
||||||
|
gunrunner: boolean
|
||||||
|
gun_ready: boolean
|
||||||
|
quickswap: boolean
|
||||||
|
tactikill: boolean
|
||||||
|
suppressor: boolean
|
||||||
|
ricochet: boolean
|
||||||
|
pro_screen: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
interface TitanChassisTable {
|
||||||
|
titan_id: string
|
||||||
|
chassis_name: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface LoadoutTable {
|
||||||
|
loadout_id: Generated<number>
|
||||||
|
primary_weapon: string
|
||||||
|
secondary_weapon: string
|
||||||
|
anti_titan_weapon: string
|
||||||
|
primary_mod_id: number
|
||||||
|
secondary_mod_id: number
|
||||||
|
anti_titan_mod_id: number
|
||||||
|
ordnance: string
|
||||||
|
tactical: string
|
||||||
|
titan_weapon: string
|
||||||
|
pilot_passive_1: string
|
||||||
|
pilot_passive_2: string
|
||||||
|
titan_passive_1: string
|
||||||
|
titan_passive_2: string
|
||||||
|
titan_passive_3: string
|
||||||
|
titan_passive_4: string
|
||||||
|
titan_passive_5: string
|
||||||
|
titan_passive_6: string
|
||||||
|
titan_special: string
|
||||||
|
titan_anti_rodeo: string
|
||||||
|
titan_primary_mod: string
|
||||||
|
titan_id: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface KillTable {
|
export interface KillTable {
|
||||||
id: Generated<number>
|
kill_id: Generated<bigint>
|
||||||
servername: string
|
attacker_id: bigint
|
||||||
host: number
|
victim_id: bigint
|
||||||
killstat_version: string
|
match_id: number
|
||||||
match_id: string
|
attacker_loadout_id: number
|
||||||
game_mode: string
|
victim_loadout_id: number
|
||||||
map: string
|
attacker_speed: number
|
||||||
unix_time: Generated<Date>
|
victim_speed: number
|
||||||
game_time: number
|
attacker_movementstate: string
|
||||||
player_count: number
|
victim_movementstate: string
|
||||||
attacker_name: string
|
|
||||||
attacker_id: string
|
|
||||||
attacker_current_weapon: string
|
|
||||||
attacker_current_weapon_mods: number
|
|
||||||
attacker_weapon_1: string
|
|
||||||
attacker_weapon_1_mods: number
|
|
||||||
attacker_weapon_2: string
|
|
||||||
attacker_weapon_2_mods: number
|
|
||||||
attacker_weapon_3: string
|
|
||||||
attacker_weapon_3_mods: number
|
|
||||||
attacker_offhand_weapon_1: string
|
|
||||||
attacker_offhand_weapon_1_mods: number
|
|
||||||
attacker_offhand_weapon_2: string
|
|
||||||
attacker_offhand_weapon_2_mods: number
|
|
||||||
victim_name: string
|
|
||||||
victim_id: string
|
|
||||||
victim_current_weapon: string
|
|
||||||
victim_current_weapon_mods: number
|
|
||||||
victim_weapon_1: string
|
|
||||||
victim_weapon_1_mods: number
|
|
||||||
victim_weapon_2: string
|
|
||||||
victim_weapon_2_mods: number
|
|
||||||
victim_weapon_3: string
|
|
||||||
victim_weapon_3_mods: string
|
|
||||||
victim_offhand_weapon_1: string
|
|
||||||
victim_offhand_weapon_1_mods: number
|
|
||||||
victim_offhand_weapon_2: string
|
|
||||||
victim_offhand_weapon_2_mods: number
|
|
||||||
cause_of_death: string
|
|
||||||
distance: number
|
distance: number
|
||||||
titan?: string
|
unix_time: Date
|
||||||
|
game_time: number
|
||||||
|
cause_of_death: string
|
||||||
|
attacker_held_weapon: string
|
||||||
|
victim_held_weapon: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TitanStatsInMatchTable {
|
||||||
|
match_id: number
|
||||||
|
player_id: bigint
|
||||||
|
titan_id: string
|
||||||
|
playtime: bigint
|
||||||
|
shots_fired: number
|
||||||
|
shots_hit: number
|
||||||
|
headshots: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface WeaponStatsInMatchTable {
|
||||||
|
match_id: number
|
||||||
|
player_id: bigint
|
||||||
|
weapon_id: string
|
||||||
|
playtime: bigint
|
||||||
|
shots_fired: number
|
||||||
|
shots_hit: number
|
||||||
|
headshots: number
|
||||||
|
ricochets: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PlayerStatsInMatchTable {
|
||||||
|
match_id: number
|
||||||
|
player_id: bigint
|
||||||
|
shots_fired: number
|
||||||
|
shots_hit: number
|
||||||
|
headshots: number
|
||||||
|
ricochets: number
|
||||||
|
overall_distance_covered: bigint
|
||||||
|
time_grounded: bigint
|
||||||
|
time_wall: bigint
|
||||||
|
time_air: bigint
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KillViewTable {
|
export interface KillViewTable {
|
||||||
@@ -59,15 +141,20 @@ export interface KillViewTable {
|
|||||||
total_distance: number
|
total_distance: number
|
||||||
}
|
}
|
||||||
|
|
||||||
interface HosterTable {
|
|
||||||
id: Generated<number>
|
|
||||||
name: string
|
|
||||||
token: Generated<string>
|
|
||||||
}
|
|
||||||
interface Database {
|
interface Database {
|
||||||
kill_view: KillViewTable
|
kill_view: KillViewTable
|
||||||
|
host: HostTable
|
||||||
|
server: ServerTable
|
||||||
|
match: MatchTable
|
||||||
|
player: PlayerTable
|
||||||
|
weapon: WeaponTable
|
||||||
|
mods_on_weapon: ModsOnWeaponTable
|
||||||
|
titan_chassis: TitanChassisTable
|
||||||
|
loadout: LoadoutTable
|
||||||
kill: KillTable
|
kill: KillTable
|
||||||
host: HosterTable
|
titan_stats_in_match: TitanStatsInMatchTable
|
||||||
|
weapon_stats_in_match: WeaponStatsInMatchTable
|
||||||
|
player_stats_in_match: PlayerStatsInMatchTable
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Database
|
export default Database
|
||||||
|
|||||||
Reference in New Issue
Block a user