Files
book_library_server/fastapi_book_server/app/serializers/sequence.py
2023-06-02 21:02:57 +02:00

32 lines
499 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]
annotation_exists: bool
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