97 lines
4.2 KiB
Python
97 lines
4.2 KiB
Python
"""All models — split into individual files for maintainability.
|
|
|
|
Import this module to register all models with SQLAlchemy and expose every
|
|
class, constant, and helper for use throughout the application.
|
|
|
|
Usage::
|
|
|
|
from app.models import User, Admin, Evaluation, ESPORT_GAMES, ...
|
|
|
|
Backward-compatible — no consumer changes needed.
|
|
"""
|
|
|
|
# =========================================================================
|
|
# Layer 0: constants (no app deps)
|
|
# =========================================================================
|
|
from app.models._constants import (
|
|
USER_TYPES,
|
|
ESPORT_GAMES,
|
|
GAME_POSITIONS,
|
|
GAME_PLATFORMS,
|
|
PLATFORM_CODES,
|
|
TRN_URLS,
|
|
EVALUATION_CRITERIA,
|
|
)
|
|
|
|
# =========================================================================
|
|
# Layer 1: loaders & associations
|
|
# =========================================================================
|
|
from app.models._loaders import load_user # noqa: F401 — registers Flask-Login callback
|
|
|
|
# =========================================================================
|
|
# Layer 2: abstract base classes
|
|
# =========================================================================
|
|
from app.models.availability.base import BaseAvailability
|
|
from app.models.match_model.base import BaseMatch
|
|
from app.models.participant.base import BaseParticipant
|
|
|
|
# =========================================================================
|
|
# Layer 3: user hierarchy (polymorphic)
|
|
# =========================================================================
|
|
from app.models.user_model.user import User
|
|
from app.models.user_model.admin import Admin
|
|
from app.models.user_model.manager import Manager
|
|
from app.models.user_model.coach import Coach
|
|
from app.models.user_model.player import Player
|
|
from app.models.user_model.scout import Scout
|
|
|
|
# =========================================================================
|
|
# Layer 4: org_team + junction
|
|
# =========================================================================
|
|
from app.models.org_team.org_team import OrgTeam
|
|
from app.models.org_team.team_player import TeamPlayer
|
|
|
|
# =========================================================================
|
|
# Layer 5: concrete availability models
|
|
# =========================================================================
|
|
from app.models.availability.player_disponibility import PlayerDisponibility
|
|
from app.models.availability.coach_availability import CoachAvailability
|
|
|
|
# =========================================================================
|
|
# Layer 6: tryout + registration
|
|
# =========================================================================
|
|
from app.models.tryout.tryout import Tryout
|
|
from app.models.tryout.tryout_registration import TryoutRegistration
|
|
|
|
# =========================================================================
|
|
# Layer 7: evaluation
|
|
# =========================================================================
|
|
from app.models.evaluation import Evaluation
|
|
|
|
# =========================================================================
|
|
# Layer 8: tryout-specific teams
|
|
# =========================================================================
|
|
from app.models.team.team import Team
|
|
from app.models.team.team_member import TeamMember
|
|
|
|
# =========================================================================
|
|
# Layer 9: matches (tryout-scoped + regular-season)
|
|
# =========================================================================
|
|
from app.models.match_model.match import Match
|
|
from app.models.match_model.team_match import TeamMatch
|
|
|
|
# =========================================================================
|
|
# Layer 10: participants
|
|
# =========================================================================
|
|
from app.models.participant.match_participant import MatchParticipant
|
|
from app.models.participant.team_match_participant import TeamMatchParticipant
|
|
|
|
# =========================================================================
|
|
# Layer 11: remaining standalone models
|
|
# =========================================================================
|
|
from app.models.user_gamertag import UserGamertag
|
|
from app.models.contract import Contract
|
|
from app.models.team_note import TeamNote
|
|
from app.models.personal_note import PersonalNote
|
|
from app.models.one_on_one_request import OneOnOneRequest
|