mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 07:05:36 +01:00
30 lines
470 B
Python
30 lines
470 B
Python
from datetime import date
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Sequence(BaseModel):
|
|
id: int
|
|
name: str
|
|
|
|
|
|
class Author(BaseModel):
|
|
id: int
|
|
|
|
first_name: str
|
|
last_name: str
|
|
middle_name: Optional[str]
|
|
|
|
|
|
class Book(BaseModel):
|
|
id: int
|
|
title: str
|
|
lang: str
|
|
file_type: str
|
|
available_types: list[str]
|
|
uploaded: date
|
|
authors: list[Author]
|
|
translators: list[Author]
|
|
annotation_exists: bool
|