Moved code to subfolder

This commit is contained in:
2023-03-10 09:21:27 +01:00
parent 69416eb896
commit b90fbdf668
12 changed files with 24 additions and 0 deletions

40
backend/models/request.py Normal file
View File

@@ -0,0 +1,40 @@
from beanie import Document
from pydantic import BaseModel
class Request(Document):
id: str
requested_text: str
response_text: str
language_from: str
language_to: str
unixdate: int
class Settings:
name = "request"
class Config:
schema_extra = {
"example": {
"id": "9e90b529-05d0-4b0e-a8f8-de17e72e553c",
"requested_text": "I would really like to drive your car around the block a few times!",
"response_text": "Ich würde wirklich gerne mit Ihrem Auto ein paar Mal um den Block fahren!",
"language_from": "en",
"language_to": "de",
"date": 1678225669
}
}
class RequestData(BaseModel):
requested_text: str
language_from: str
language_to: str
class Config:
schema_extra = {
"example": {
"requested_text": "I would really like to drive your car around the block a few times!",
"language_from": "en",
"language_to": "de",
}
}