POL-127: Add organizations table and championship ownership
- Create organizations table with Alembic migration (3-phase: create table, migrate data, drop old column) - Add org_id FK on championships linking to organizations - Refactor all schemas into one-class-per-file packages (auth, championship, organization, participant, registration, user) - Update CRUD layer with selectinload for organization relationships - Update frontend types and components to use nested organization object - Remove phantom Championship fields (subtitle, venue, accent_color) from frontend Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
4
backend/app/schemas/participant/__init__.py
Normal file
4
backend/app/schemas/participant/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from app.schemas.participant.out import ParticipantListOut
|
||||
from app.schemas.participant.publish import ParticipantListPublish
|
||||
|
||||
__all__ = ["ParticipantListOut", "ParticipantListPublish"]
|
||||
15
backend/app/schemas/participant/out.py
Normal file
15
backend/app/schemas/participant/out.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ParticipantListOut(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
id: uuid.UUID
|
||||
championship_id: uuid.UUID
|
||||
is_published: bool
|
||||
published_at: datetime | None
|
||||
notes: str | None
|
||||
created_at: datetime
|
||||
5
backend/app/schemas/participant/publish.py
Normal file
5
backend/app/schemas/participant/publish.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ParticipantListPublish(BaseModel):
|
||||
notes: str | None = None
|
||||
Reference in New Issue
Block a user