Moved code to subfolder
This commit is contained in:
40
backend/models/request.py
Normal file
40
backend/models/request.py
Normal 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",
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user