mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Code clean up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user