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,7 +3,6 @@ from datetime import date
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.serializers.author import Author
|
||||
from app.serializers.orjson_config import ORJSONConfig
|
||||
from app.serializers.sequence import Sequence
|
||||
|
||||
|
||||
@@ -28,9 +27,6 @@ class Book(BaseModel):
|
||||
translators: list[Author]
|
||||
annotation_exists: bool
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class RemoteBook(Book):
|
||||
source: BookSource
|
||||
@@ -41,40 +37,3 @@ class BookDetail(RemoteBook):
|
||||
sequences: list[Sequence]
|
||||
genres: list[BookGenre]
|
||||
is_deleted: bool
|
||||
|
||||
|
||||
class CreateBook(BaseModel):
|
||||
source: int
|
||||
remote_id: int
|
||||
title: str
|
||||
lang: str
|
||||
file_type: str
|
||||
uploaded: date
|
||||
authors: list[int]
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class UpdateBook(BaseModel):
|
||||
title: str
|
||||
lang: str
|
||||
file_type: str
|
||||
uploaded: date
|
||||
authors: list[int]
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
|
||||
class CreateRemoteBook(BaseModel):
|
||||
source: int
|
||||
remote_id: int
|
||||
title: str
|
||||
lang: str
|
||||
file_type: str
|
||||
uploaded: date
|
||||
remote_authors: list[int]
|
||||
|
||||
class Config(ORJSONConfig):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user