"""Models for graphql entities.""" from __future__ import annotations from typing import List from typing import Optional from pydantic import BaseModel class Participant(BaseModel): """Participant model.""" uuid: str name: str class Participation(BaseModel): """Participation model for Product and Track.""" participated_as: str = None participant: Participant class LabelSoundRecording(BaseModel): """LabelSoundRecording model.""" id: str isrc: str class Track(BaseModel): """Track model.""" tuid: str isrc: Optional[str] participations: List[Participation] labelSoundRecording: Optional[LabelSoundRecording] class Product(BaseModel): """Product model.""" productId: int upc: str participations: List[Participation] tracks: List[Track] class ProductMetadata(BaseModel): """ProductMetadata model.""" product: Product