Files
mcma-backend/app/infrastructure/db/models/__init__.py
T
Цвылев Александр Вадимович a263272935 feat(api): finish Group A stubbed endpoints
Implements previously-stubbed /api/v1 endpoints (hexagonal: ports -> repos
-> services -> routers wired in deps):

- playlists: GET /{id}/cover (serves stored cover, 404 when absent)
- settings: GET/PATCH /settings + GET/PUT /settings/scrobbling — lazy
  per-user row, write-only Fernet-encrypted scrobble session key; adds
  user_settings table + migration (chains off dc126696f5a6)
- storage: GET /duplicates, /broken, /missing-metadata + admin POST
  /cleanup (arq cleanup_storage worker; reconciles local refs only,
  guarded against a storage-outage mass delete)
- admin: GET /services, /sources, /settings + POST /reindex; PATCH
  /settings and /sources/{source} return 501 (config is env-managed)

Adds NotSupportedError (-> HTTP 501). Integration tests for each surface.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-28 14:33:12 +03:00

33 lines
1.1 KiB
Python

"""ORM models package.
Importing this package registers every model on ``Base.metadata`` so Alembic
autogenerate and ``create_all`` (tests) see the full schema. ``alembic/env.py``
imports it for exactly this side effect.
"""
from app.infrastructure.db.models.album import AlbumModel
from app.infrastructure.db.models.artist import ArtistModel
from app.infrastructure.db.models.download_job import DownloadJobModel
from app.infrastructure.db.models.like import LikeModel
from app.infrastructure.db.models.lyrics import LyricsModel
from app.infrastructure.db.models.play_history import PlayHistoryModel
from app.infrastructure.db.models.playlist import PlaylistModel, PlaylistTrackModel
from app.infrastructure.db.models.track import TrackModel
from app.infrastructure.db.models.user import RefreshTokenModel, UserModel
from app.infrastructure.db.models.user_settings import UserSettingsModel
__all__ = [
"AlbumModel",
"ArtistModel",
"DownloadJobModel",
"LikeModel",
"LyricsModel",
"PlayHistoryModel",
"PlaylistModel",
"PlaylistTrackModel",
"RefreshTokenModel",
"TrackModel",
"UserModel",
"UserSettingsModel",
]