feat: implement user data schema and API endpoints

- Add Alembic migration setup with async configuration
- Create 16 user data models (users, decks, cards, replays, etc.)
- Implement comprehensive API endpoints with JWT auth
- Add replay, card collection, group, network, preferences, and activity log routers
- Include API documentation and migration test plan
- Update Dockerfile to run migrations on startup
This commit is contained in:
2026-07-23 03:23:54 +00:00
parent 2c74a107bc
commit c42d7ca0e1
13 changed files with 4068 additions and 3 deletions
+21
View File
@@ -2,6 +2,12 @@
from app.models.models import User, DecklistFile, DecklistFolder, Room, RoomGameType, Ban, GameLog, AuditLog
from app.models.mtg_models import MtgSet, MtgCard
from app.models.mirror_models import MtgCardMirror, DeckCardLink
from app.models.user_data import (
UserSession, DeckVersion, GameReplay, ReplayPlayer,
GameOutcome, UserStatistics, UserCardCollection, CardWishlist,
UserGroup, GroupMember, GroupChatMessage, UserNetwork,
NetworkMember, UserPreference, UserActivityLog
)
__all__ = [
"User",
@@ -16,4 +22,19 @@ __all__ = [
"MtgCard",
"MtgCardMirror",
"DeckCardLink",
"UserSession",
"DeckVersion",
"GameReplay",
"ReplayPlayer",
"GameOutcome",
"UserStatistics",
"UserCardCollection",
"CardWishlist",
"UserGroup",
"GroupMember",
"GroupChatMessage",
"UserNetwork",
"NetworkMember",
"UserPreference",
"UserActivityLog",
]