mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-10 18:30:22 +01:00
Code clean up
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.serializers.orjson_config import ORJSONConfig
|
||||
|
||||
|
||||
class TranslationBook(BaseModel):
|
||||
id: int
|
||||
@@ -9,9 +7,6 @@ class TranslationBook(BaseModel):
|
||||
lang: str
|
||||
file_type: str
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class TranslationTranslator(BaseModel):
|
||||
id: int
|
||||
@@ -19,33 +14,8 @@ class TranslationTranslator(BaseModel):
|
||||
last_name: str
|
||||
middle_name: str
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class Translation(BaseModel):
|
||||
book: TranslationBook
|
||||
translator: TranslationTranslator
|
||||
position: int
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class CreateTranslation(BaseModel):
|
||||
book: int
|
||||
translator: int
|
||||
position: int
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class CreateRemoteTranslation(BaseModel):
|
||||
source: int
|
||||
remote_book: int
|
||||
remote_translator: int
|
||||
position: int
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user