mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
16 lines
343 B
Python
16 lines
343 B
Python
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class AudiobookGenreBase(BaseModel):
|
|
genre: str = Field(default=None, examples=["Боевик"])
|
|
|
|
|
|
class AudiobookGenreCreate(AudiobookGenreBase):
|
|
pass
|
|
|
|
|
|
class AudiobookGenre(AudiobookGenreBase):
|
|
id: int = Field(examples=[1])
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|