Spaces:
Running on T4
Running on T4
Download backend/app/modules/teams/schemas.py from modventures/baseball-engine: direct link, hf CLI and curl.
- Browser
- Download file 877 Bytes
-
https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/backend/app/modules/teams/schemas.py
- Command line
-
hf download hf://spaces/modventures/baseball-engine/backend/app/modules/teams/schemas.py
-
curl -L -o schemas.py https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/backend/app/modules/teams/schemas.py
877 Bytes
| from datetime import datetime | |
| from typing import Literal | |
| from uuid import UUID | |
| from pydantic import Field | |
| from app.common.schemas import RequestModel, ResponseModel | |
| class TeamOut(ResponseModel): | |
| """The team shape every endpoint returns (GET /me, team create, lookup and join).""" | |
| id: UUID | |
| code: str | |
| name: str | |
| coach_id: UUID | |
| coach_name: str | |
| coaching: str | |
| created_at: datetime | |
| class TeamCreate(RequestModel): | |
| name: str = Field(min_length=2, max_length=60) | |
| coach_name: str = Field(min_length=2, max_length=60) | |
| coaching: Literal["h", "p", "both"] | |
| class TeamResponse(ResponseModel): | |
| team: TeamOut | |
| class TeamSummaryOut(ResponseModel): | |
| """What a player sees before joining: no ids.""" | |
| code: str | |
| name: str | |
| coach_name: str | |
| coaching: str | |
| class TeamSummaryResponse(ResponseModel): | |
| team: TeamSummaryOut | |