mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
refactor
This commit is contained in:
51
app/schemas/shakespeare.py
Normal file
51
app/schemas/shakespeare.py
Normal file
@@ -0,0 +1,51 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Character(BaseModel):
|
||||
id: str
|
||||
abbrev: str
|
||||
speech_count: int
|
||||
name: str
|
||||
description: Any
|
||||
|
||||
|
||||
class Chapter(BaseModel):
|
||||
work_id: str
|
||||
section_number: int
|
||||
description: str
|
||||
id: int
|
||||
chapter_number: int
|
||||
|
||||
|
||||
class Work(BaseModel):
|
||||
id: str
|
||||
year: int
|
||||
source: str
|
||||
total_paragraphs: int
|
||||
title: str
|
||||
long_title: str
|
||||
genre_type: str
|
||||
total_words: int
|
||||
notes: Any
|
||||
|
||||
|
||||
class Paragraph(BaseModel):
|
||||
id: int
|
||||
character_id: str
|
||||
phonetic_text: str
|
||||
paragraph_type: str
|
||||
section_number: int
|
||||
char_count: int
|
||||
work_id: str
|
||||
paragraph_num: int
|
||||
plain_text: str
|
||||
stem_text: str
|
||||
chapter_number: int
|
||||
word_count: int
|
||||
character: Character
|
||||
chapter: Chapter
|
||||
work: Work
|
||||
Reference in New Issue
Block a user