mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Add translators to Book serializers
This commit is contained in:
@@ -47,27 +47,21 @@ class AuthorBook(BaseModel):
|
||||
file_type: str
|
||||
available_types: list[str]
|
||||
uploaded: date
|
||||
translators: list[Author]
|
||||
annotation_exists: bool
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class Translation(BaseModel):
|
||||
translator: Author
|
||||
position: int
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class TranslatedBook(BaseModel):
|
||||
id: int
|
||||
title: str
|
||||
lang: str
|
||||
file_type: str
|
||||
available_types: list[str]
|
||||
authors: list[Author]
|
||||
translations: list[Translation]
|
||||
annotation_exists: bool
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user