feat: add card import feature with fuzzy matching

- Add UserCardImport model (stores imported card names as JSON)
- Create card_import_schemas.py with request/response models
- Create card_import.py router with import/get/delete endpoints
- Add Alembic migration 004 (user_card_imports table)
- Fuzzy matching for card name matching (60% threshold)
- Integration with deckbuilding via imported cards
- Endpoints: GET /api/v1/card-import/status, POST /, DELETE /, GET /summary
This commit is contained in:
2026-07-24 04:47:42 +00:00
parent c23f88cd41
commit 867b7a9c37
9 changed files with 436 additions and 3 deletions
+3
View File
@@ -9,6 +9,7 @@ from app.models.user_data import (
NetworkMember, UserPreference, UserActivityLog
)
from app.models.user_deck import UserDeck, UserDeckCard, DeckPrecedent, DeckPrecedentCard, CardSuggestion
from app.models.user_card_import import UserCardImport
__all__ = [
"User",
@@ -43,4 +44,6 @@ __all__ = [
"DeckPrecedent",
"DeckPrecedentCard",
"CardSuggestion",
"UserCardCollection",
"UserCardImport",
]