fxxk merge
This commit is contained in:
@@ -12,12 +12,12 @@ from app.auth import get_password_hash
|
||||
from app.database import (
|
||||
Base,
|
||||
DailyChallengeStats,
|
||||
LazerUserStatistics as UserStatistics,
|
||||
LazerUserStatistics,
|
||||
RankHistory,
|
||||
User,
|
||||
UserAchievement,
|
||||
)
|
||||
from app.dependencies import engine, get_db
|
||||
from app.dependencies.database import engine, get_db
|
||||
|
||||
# 创建所有表
|
||||
Base.metadata.create_all(bind=engine)
|
||||
@@ -58,92 +58,92 @@ def create_sample_user():
|
||||
custom_badge_icon=None,
|
||||
userpage_content="「世界に忘れられた」",
|
||||
api_key=None,
|
||||
# # 兼容性字段
|
||||
# avatar_url="https://a.ppy.sh/15651670?1732362658.jpeg",
|
||||
# cover_url="https://assets.ppy.sh/user-profile-covers/15651670/0fc7b77adef39765a570e7f535bc383e5a848850d41a8943f8857984330b8bc6.jpeg",
|
||||
# has_supported=True,
|
||||
# interests="「世界に忘れられた」",
|
||||
# location="咕谷国",
|
||||
# website="https://gmoe.cc",
|
||||
# playstyle=["mouse", "keyboard", "tablet"],
|
||||
# profile_order=[
|
||||
# "me",
|
||||
# "recent_activity",
|
||||
# "top_ranks",
|
||||
# "medals",
|
||||
# "historical",
|
||||
# "beatmaps",
|
||||
# "kudosu",
|
||||
# ],
|
||||
# beatmap_playcounts_count=3306,
|
||||
# favourite_beatmapset_count=15,
|
||||
# follower_count=98,
|
||||
# graveyard_beatmapset_count=7,
|
||||
# mapping_follower_count=1,
|
||||
# previous_usernames=["hehejun"],
|
||||
# monthly_playcounts=[
|
||||
# {"start_date": "2019-11-01", "count": 43},
|
||||
# {"start_date": "2020-04-01", "count": 216},
|
||||
# {"start_date": "2020-05-01", "count": 656},
|
||||
# {"start_date": "2020-07-01", "count": 158},
|
||||
# {"start_date": "2020-08-01", "count": 174},
|
||||
# {"start_date": "2020-10-01", "count": 13},
|
||||
# {"start_date": "2020-11-01", "count": 52},
|
||||
# {"start_date": "2020-12-01", "count": 140},
|
||||
# {"start_date": "2021-01-01", "count": 359},
|
||||
# {"start_date": "2021-02-01", "count": 452},
|
||||
# {"start_date": "2021-03-01", "count": 77},
|
||||
# {"start_date": "2021-04-01", "count": 114},
|
||||
# {"start_date": "2021-05-01", "count": 270},
|
||||
# {"start_date": "2021-06-01", "count": 148},
|
||||
# {"start_date": "2021-07-01", "count": 246},
|
||||
# {"start_date": "2021-08-01", "count": 56},
|
||||
# {"start_date": "2021-09-01", "count": 136},
|
||||
# {"start_date": "2021-10-01", "count": 45},
|
||||
# {"start_date": "2021-11-01", "count": 98},
|
||||
# {"start_date": "2021-12-01", "count": 54},
|
||||
# {"start_date": "2022-01-01", "count": 88},
|
||||
# {"start_date": "2022-02-01", "count": 45},
|
||||
# {"start_date": "2022-03-01", "count": 6},
|
||||
# {"start_date": "2022-04-01", "count": 54},
|
||||
# {"start_date": "2022-05-01", "count": 105},
|
||||
# {"start_date": "2022-06-01", "count": 37},
|
||||
# {"start_date": "2022-07-01", "count": 88},
|
||||
# {"start_date": "2022-08-01", "count": 7},
|
||||
# {"start_date": "2022-09-01", "count": 9},
|
||||
# {"start_date": "2022-10-01", "count": 6},
|
||||
# {"start_date": "2022-11-01", "count": 2},
|
||||
# {"start_date": "2022-12-01", "count": 16},
|
||||
# {"start_date": "2023-01-01", "count": 7},
|
||||
# {"start_date": "2023-04-01", "count": 16},
|
||||
# {"start_date": "2023-05-01", "count": 3},
|
||||
# {"start_date": "2023-06-01", "count": 8},
|
||||
# {"start_date": "2023-07-01", "count": 23},
|
||||
# {"start_date": "2023-08-01", "count": 3},
|
||||
# {"start_date": "2023-09-01", "count": 1},
|
||||
# {"start_date": "2023-10-01", "count": 25},
|
||||
# {"start_date": "2023-11-01", "count": 160},
|
||||
# {"start_date": "2023-12-01", "count": 306},
|
||||
# {"start_date": "2024-01-01", "count": 735},
|
||||
# {"start_date": "2024-02-01", "count": 420},
|
||||
# {"start_date": "2024-03-01", "count": 549},
|
||||
# {"start_date": "2024-04-01", "count": 466},
|
||||
# {"start_date": "2024-05-01", "count": 333},
|
||||
# {"start_date": "2024-06-01", "count": 1126},
|
||||
# {"start_date": "2024-07-01", "count": 534},
|
||||
# {"start_date": "2024-08-01", "count": 280},
|
||||
# {"start_date": "2024-09-01", "count": 116},
|
||||
# {"start_date": "2024-10-01", "count": 120},
|
||||
# {"start_date": "2024-11-01", "count": 332},
|
||||
# {"start_date": "2024-12-01", "count": 243},
|
||||
# {"start_date": "2025-01-01", "count": 122},
|
||||
# {"start_date": "2025-02-01", "count": 379},
|
||||
# {"start_date": "2025-03-01", "count": 278},
|
||||
# {"start_date": "2025-04-01", "count": 296},
|
||||
# {"start_date": "2025-05-01", "count": 964},
|
||||
# {"start_date": "2025-06-01", "count": 821},
|
||||
# {"start_date": "2025-07-01", "count": 230},
|
||||
# ],
|
||||
# # 兼容性字段
|
||||
# avatar_url="https://a.ppy.sh/15651670?1732362658.jpeg",
|
||||
# cover_url="https://assets.ppy.sh/user-profile-covers/15651670/0fc7b77adef39765a570e7f535bc383e5a848850d41a8943f8857984330b8bc6.jpeg",
|
||||
# has_supported=True,
|
||||
# interests="「世界に忘れられた」",
|
||||
# location="咕谷国",
|
||||
# website="https://gmoe.cc",
|
||||
# playstyle=["mouse", "keyboard", "tablet"],
|
||||
# profile_order=[
|
||||
# "me",
|
||||
# "recent_activity",
|
||||
# "top_ranks",
|
||||
# "medals",
|
||||
# "historical",
|
||||
# "beatmaps",
|
||||
# "kudosu",
|
||||
# ],
|
||||
# beatmap_playcounts_count=3306,
|
||||
# favourite_beatmapset_count=15,
|
||||
# follower_count=98,
|
||||
# graveyard_beatmapset_count=7,
|
||||
# mapping_follower_count=1,
|
||||
# previous_usernames=["hehejun"],
|
||||
# monthly_playcounts=[
|
||||
# {"start_date": "2019-11-01", "count": 43},
|
||||
# {"start_date": "2020-04-01", "count": 216},
|
||||
# {"start_date": "2020-05-01", "count": 656},
|
||||
# {"start_date": "2020-07-01", "count": 158},
|
||||
# {"start_date": "2020-08-01", "count": 174},
|
||||
# {"start_date": "2020-10-01", "count": 13},
|
||||
# {"start_date": "2020-11-01", "count": 52},
|
||||
# {"start_date": "2020-12-01", "count": 140},
|
||||
# {"start_date": "2021-01-01", "count": 359},
|
||||
# {"start_date": "2021-02-01", "count": 452},
|
||||
# {"start_date": "2021-03-01", "count": 77},
|
||||
# {"start_date": "2021-04-01", "count": 114},
|
||||
# {"start_date": "2021-05-01", "count": 270},
|
||||
# {"start_date": "2021-06-01", "count": 148},
|
||||
# {"start_date": "2021-07-01", "count": 246},
|
||||
# {"start_date": "2021-08-01", "count": 56},
|
||||
# {"start_date": "2021-09-01", "count": 136},
|
||||
# {"start_date": "2021-10-01", "count": 45},
|
||||
# {"start_date": "2021-11-01", "count": 98},
|
||||
# {"start_date": "2021-12-01", "count": 54},
|
||||
# {"start_date": "2022-01-01", "count": 88},
|
||||
# {"start_date": "2022-02-01", "count": 45},
|
||||
# {"start_date": "2022-03-01", "count": 6},
|
||||
# {"start_date": "2022-04-01", "count": 54},
|
||||
# {"start_date": "2022-05-01", "count": 105},
|
||||
# {"start_date": "2022-06-01", "count": 37},
|
||||
# {"start_date": "2022-07-01", "count": 88},
|
||||
# {"start_date": "2022-08-01", "count": 7},
|
||||
# {"start_date": "2022-09-01", "count": 9},
|
||||
# {"start_date": "2022-10-01", "count": 6},
|
||||
# {"start_date": "2022-11-01", "count": 2},
|
||||
# {"start_date": "2022-12-01", "count": 16},
|
||||
# {"start_date": "2023-01-01", "count": 7},
|
||||
# {"start_date": "2023-04-01", "count": 16},
|
||||
# {"start_date": "2023-05-01", "count": 3},
|
||||
# {"start_date": "2023-06-01", "count": 8},
|
||||
# {"start_date": "2023-07-01", "count": 23},
|
||||
# {"start_date": "2023-08-01", "count": 3},
|
||||
# {"start_date": "2023-09-01", "count": 1},
|
||||
# {"start_date": "2023-10-01", "count": 25},
|
||||
# {"start_date": "2023-11-01", "count": 160},
|
||||
# {"start_date": "2023-12-01", "count": 306},
|
||||
# {"start_date": "2024-01-01", "count": 735},
|
||||
# {"start_date": "2024-02-01", "count": 420},
|
||||
# {"start_date": "2024-03-01", "count": 549},
|
||||
# {"start_date": "2024-04-01", "count": 466},
|
||||
# {"start_date": "2024-05-01", "count": 333},
|
||||
# {"start_date": "2024-06-01", "count": 1126},
|
||||
# {"start_date": "2024-07-01", "count": 534},
|
||||
# {"start_date": "2024-08-01", "count": 280},
|
||||
# {"start_date": "2024-09-01", "count": 116},
|
||||
# {"start_date": "2024-10-01", "count": 120},
|
||||
# {"start_date": "2024-11-01", "count": 332},
|
||||
# {"start_date": "2024-12-01", "count": 243},
|
||||
# {"start_date": "2025-01-01", "count": 122},
|
||||
# {"start_date": "2025-02-01", "count": 379},
|
||||
# {"start_date": "2025-03-01", "count": 278},
|
||||
# {"start_date": "2025-04-01", "count": 296},
|
||||
# {"start_date": "2025-05-01", "count": 964},
|
||||
# {"start_date": "2025-06-01", "count": 821},
|
||||
# {"start_date": "2025-07-01", "count": 230},
|
||||
# ],
|
||||
)
|
||||
|
||||
db.add(user)
|
||||
@@ -151,7 +151,7 @@ def create_sample_user():
|
||||
db.refresh(user)
|
||||
|
||||
# 创建 osu! 模式统计
|
||||
osu_stats = UserStatistics(
|
||||
osu_stats = LazerUserStatistics(
|
||||
user_id=user.id,
|
||||
mode="osu",
|
||||
count_100=276274,
|
||||
@@ -182,7 +182,7 @@ def create_sample_user():
|
||||
)
|
||||
|
||||
# 创建 taiko 模式统计
|
||||
taiko_stats = UserStatistics(
|
||||
taiko_stats = LazerUserStatistics(
|
||||
user_id=user.id,
|
||||
mode="taiko",
|
||||
count_100=160,
|
||||
@@ -205,7 +205,7 @@ def create_sample_user():
|
||||
)
|
||||
|
||||
# 创建 fruits 模式统计
|
||||
fruits_stats = UserStatistics(
|
||||
fruits_stats = LazerUserStatistics(
|
||||
user_id=user.id,
|
||||
mode="fruits",
|
||||
count_100=109,
|
||||
@@ -229,7 +229,7 @@ def create_sample_user():
|
||||
)
|
||||
|
||||
# 创建 mania 模式统计
|
||||
mania_stats = UserStatistics(
|
||||
mania_stats = LazerUserStatistics(
|
||||
user_id=user.id,
|
||||
mode="mania",
|
||||
count_100=7867,
|
||||
|
||||
Reference in New Issue
Block a user