Coverage for apps/kwai-api/src/kwai_api/v1/portal/coaches/schemas.py: 100%
7 statements
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
1"""Module that defines schema's for JSON:API structures for one or more coaches."""
3from kwai_core.json_api import Meta
4from pydantic import BaseModel, Field
6from kwai_api.schemas.resources import CoachResourceIdentifier
9class CoachAttributes(BaseModel):
10 """Attributes for a coach."""
12 name: str
13 diploma: str
14 description: str
17class CoachResource(CoachResourceIdentifier):
18 """A JSON:API resource for a coach."""
20 attributes: CoachAttributes
23class CoachesDocument(BaseModel):
24 """A JSON:API document for multiple coaches."""
26 meta: Meta
27 data: list[CoachResource] = Field(default_factory=list)