mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
Complete genres and actors
This commit is contained in:
@@ -40,17 +40,17 @@ class AudiobookBase(AudiobookCardBase):
|
||||
duration: Optional[str] = Field(default=None, examples=["12:38"])
|
||||
reader: Optional[str] = Field(default=None, examples=["Дмитрий Хазанович"])
|
||||
|
||||
genres: Optional[list[AudiobookGenre]] = Field()
|
||||
|
||||
|
||||
class AudiobookCreate(AudiobookBase):
|
||||
genres: Optional[list[int]] = Field(default=None, examples=[[1, 2]])
|
||||
...
|
||||
|
||||
|
||||
class Audiobook(AudiobookBase):
|
||||
id: int = Field(examples=[1])
|
||||
update_date: str = Field(examples=["2024-06-14 12:00:00"])
|
||||
|
||||
genres: list[AudiobookGenre] = Field()
|
||||
|
||||
owner: User = Field()
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
Reference in New Issue
Block a user