mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 12:20:38 +04:00
16 lines
331 B
Python
16 lines
331 B
Python
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class MovieGenreBase(BaseModel):
|
|
genre: str = Field(default=None, examples=["Фантастика"])
|
|
|
|
|
|
class MovieGenreCreate(MovieGenreBase):
|
|
pass
|
|
|
|
|
|
class MovieGenre(MovieGenreBase):
|
|
id: int = Field(examples=[1])
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|