blob: 8bc69e40e1d34a7c496fd88cc16793226dabe94c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import typing as t
from pydantic import BaseModel, Field
from .antispam import AntiSpam
from .discord_user import DiscordUser
class FormResponse(BaseModel):
"""Schema model for form response."""
id: str = Field(alias="_id")
user: t.Optional[DiscordUser]
antispam: t.Optional[AntiSpam]
response: dict[str, t.Any]
form_id: str
class Config:
allow_population_by_field_name = True
class ResponseList(BaseModel):
__root__: t.List[FormResponse]
|