Code clean up

This commit is contained in:
2022-04-10 16:40:56 +03:00
parent e536574e84
commit 138e0ffa2f
20 changed files with 12 additions and 525 deletions

View File

@@ -3,8 +3,6 @@ from typing import Optional
from pydantic import BaseModel
from app.serializers.orjson_config import ORJSONConfig
class Author(BaseModel):
id: int
@@ -15,30 +13,6 @@ class Author(BaseModel):
annotation_exists: bool
class Config(ORJSONConfig):
pass
class CreateAuthor(BaseModel):
source: int
remote_id: int
first_name: str
last_name: str
middle_name: Optional[str]
class Config(ORJSONConfig):
pass
class UpdateAuthor(BaseModel):
first_name: str
last_name: str
middle_name: Optional[str]
class Config(ORJSONConfig):
pass
class AuthorBook(BaseModel):
id: int
@@ -50,9 +24,6 @@ class AuthorBook(BaseModel):
translators: list[Author]
annotation_exists: bool
class Config(ORJSONConfig):
pass
class TranslatedBook(BaseModel):
id: int
@@ -62,6 +33,3 @@ class TranslatedBook(BaseModel):
available_types: list[str]
authors: list[Author]
annotation_exists: bool
class Config(ORJSONConfig):
pass