0.4.1: L2ver2 finished

This commit is contained in:
2026-01-24 00:43:05 +08:00
parent 879f63302c
commit 1deda4393c
8 changed files with 1277 additions and 271 deletions

Binary file not shown.

View File

@@ -12,7 +12,67 @@ CREATE TABLE IF NOT EXISTS dim_players (
domain TEXT,
created_at INTEGER, -- Timestamp
updated_at INTEGER, -- Timestamp
last_seen_match_id TEXT -- To track when this info was last updated
last_seen_match_id TEXT,
uuid TEXT,
email TEXT,
area TEXT,
mobile TEXT,
user_domain TEXT,
username_audit_status INTEGER,
accid TEXT,
team_id INTEGER,
trumpet_count INTEGER,
profile_nickname TEXT,
profile_avatar_audit_status INTEGER,
profile_rgb_avatar_url TEXT,
profile_photo_url TEXT,
profile_gender INTEGER,
profile_birthday INTEGER,
profile_country_id TEXT,
profile_region_id TEXT,
profile_city_id TEXT,
profile_language TEXT,
profile_recommend_url TEXT,
profile_group_id INTEGER,
profile_reg_source INTEGER,
status_status INTEGER,
status_expire INTEGER,
status_cancellation_status INTEGER,
status_new_user INTEGER,
status_login_banned_time INTEGER,
status_anticheat_type INTEGER,
status_flag_status1 TEXT,
status_anticheat_status TEXT,
status_flag_honor TEXT,
status_privacy_policy_status INTEGER,
status_csgo_frozen_exptime INTEGER,
platformexp_level INTEGER,
platformexp_exp INTEGER,
steam_account TEXT,
steam_trade_url TEXT,
steam_rent_id TEXT,
trusted_credit INTEGER,
trusted_credit_level INTEGER,
trusted_score INTEGER,
trusted_status INTEGER,
trusted_credit_status INTEGER,
certify_id_type INTEGER,
certify_status INTEGER,
certify_age INTEGER,
certify_real_name TEXT,
certify_uid_list TEXT,
certify_audit_status INTEGER,
certify_gender INTEGER,
identity_type INTEGER,
identity_extras TEXT,
identity_status INTEGER,
identity_slogan TEXT,
identity_list TEXT,
identity_slogan_ext TEXT,
identity_live_url TEXT,
identity_live_type INTEGER,
plus_is_plus INTEGER,
user_info_raw TEXT
);
CREATE INDEX IF NOT EXISTS idx_dim_players_uid ON dim_players(uid);
@@ -38,12 +98,67 @@ CREATE TABLE IF NOT EXISTS fact_matches (
server_ip TEXT,
server_port INTEGER,
location TEXT,
has_side_data_and_rating2 INTEGER,
match_main_id INTEGER,
demo_url TEXT,
game_mode INTEGER,
game_name TEXT,
map_desc TEXT,
location_full TEXT,
match_mode INTEGER,
match_status INTEGER,
match_flag INTEGER,
status INTEGER,
waiver INTEGER,
year INTEGER,
season TEXT,
round_total INTEGER,
cs_type INTEGER,
priority_show_type INTEGER,
pug10m_show_type INTEGER,
credit_match_status INTEGER,
knife_winner INTEGER,
knife_winner_role INTEGER,
most_1v2_uid INTEGER,
most_assist_uid INTEGER,
most_awp_uid INTEGER,
most_end_uid INTEGER,
most_first_kill_uid INTEGER,
most_headshot_uid INTEGER,
most_jump_uid INTEGER,
mvp_uid INTEGER,
response_code INTEGER,
response_message TEXT,
response_status INTEGER,
response_timestamp INTEGER,
response_trace_id TEXT,
response_success INTEGER,
response_errcode INTEGER,
treat_info_raw TEXT,
round_list_raw TEXT,
leetify_data_raw TEXT,
data_source_type TEXT CHECK(data_source_type IN ('leetify', 'classic', 'unknown')), -- 'leetify' has economy data, 'classic' has detailed xyz
processed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX IF NOT EXISTS idx_fact_matches_time ON fact_matches(start_time);
CREATE TABLE IF NOT EXISTS fact_match_teams (
match_id TEXT,
group_id INTEGER,
group_all_score INTEGER,
group_change_elo REAL,
group_fh_role INTEGER,
group_fh_score INTEGER,
group_origin_elo REAL,
group_sh_role INTEGER,
group_sh_score INTEGER,
group_tid INTEGER,
group_uids TEXT,
PRIMARY KEY (match_id, group_id),
FOREIGN KEY (match_id) REFERENCES fact_matches(match_id) ON DELETE CASCADE
);
-- 4. Fact: Match Player Stats (Wide Table)
-- Aggregated stats for a player in a specific match
CREATE TABLE IF NOT EXISTS fact_match_players (
@@ -82,8 +197,12 @@ CREATE TABLE IF NOT EXISTS fact_match_players (
jump_count INTEGER,
damage_total INTEGER,
damage_received INTEGER,
damage_receive INTEGER,
damage_stats INTEGER,
assisted_kill INTEGER,
awp_kill INTEGER,
awp_kill_ct INTEGER,
awp_kill_t INTEGER,
benefit_kill INTEGER,
day TEXT,
defused_bomb INTEGER,
@@ -94,6 +213,8 @@ CREATE TABLE IF NOT EXISTS fact_match_players (
end_1v5 INTEGER,
explode_bomb INTEGER,
first_death INTEGER,
fd_ct INTEGER,
fd_t INTEGER,
first_kill INTEGER,
flash_enemy INTEGER,
flash_team INTEGER,
@@ -139,6 +260,8 @@ CREATE TABLE IF NOT EXISTS fact_match_players (
throw_harm_enemy INTEGER,
uid INTEGER,
year TEXT,
sts_raw TEXT,
level_info_raw TEXT,
PRIMARY KEY (match_id, steam_id_64),
FOREIGN KEY (match_id) REFERENCES fact_matches(match_id) ON DELETE CASCADE
@@ -177,8 +300,12 @@ CREATE TABLE IF NOT EXISTS fact_match_players_t (
jump_count INTEGER,
damage_total INTEGER,
damage_received INTEGER,
damage_receive INTEGER,
damage_stats INTEGER,
assisted_kill INTEGER,
awp_kill INTEGER,
awp_kill_ct INTEGER,
awp_kill_t INTEGER,
benefit_kill INTEGER,
day TEXT,
defused_bomb INTEGER,
@@ -189,6 +316,8 @@ CREATE TABLE IF NOT EXISTS fact_match_players_t (
end_1v5 INTEGER,
explode_bomb INTEGER,
first_death INTEGER,
fd_ct INTEGER,
fd_t INTEGER,
first_kill INTEGER,
flash_enemy INTEGER,
flash_team INTEGER,
@@ -234,6 +363,8 @@ CREATE TABLE IF NOT EXISTS fact_match_players_t (
throw_harm_enemy INTEGER,
uid INTEGER,
year TEXT,
sts_raw TEXT,
level_info_raw TEXT,
PRIMARY KEY (match_id, steam_id_64),
FOREIGN KEY (match_id) REFERENCES fact_matches(match_id) ON DELETE CASCADE
);
@@ -270,8 +401,12 @@ CREATE TABLE IF NOT EXISTS fact_match_players_ct (
jump_count INTEGER,
damage_total INTEGER,
damage_received INTEGER,
damage_receive INTEGER,
damage_stats INTEGER,
assisted_kill INTEGER,
awp_kill INTEGER,
awp_kill_ct INTEGER,
awp_kill_t INTEGER,
benefit_kill INTEGER,
day TEXT,
defused_bomb INTEGER,
@@ -282,6 +417,8 @@ CREATE TABLE IF NOT EXISTS fact_match_players_ct (
end_1v5 INTEGER,
explode_bomb INTEGER,
first_death INTEGER,
fd_ct INTEGER,
fd_t INTEGER,
first_kill INTEGER,
flash_enemy INTEGER,
flash_team INTEGER,
@@ -327,6 +464,8 @@ CREATE TABLE IF NOT EXISTS fact_match_players_ct (
throw_harm_enemy INTEGER,
uid INTEGER,
year TEXT,
sts_raw TEXT,
level_info_raw TEXT,
PRIMARY KEY (match_id, steam_id_64),
FOREIGN KEY (match_id) REFERENCES fact_matches(match_id) ON DELETE CASCADE
);