mirror of
https://github.com/grey-cat-1908/formaptix-server.git
synced 2024-09-22 19:52:00 +03:00
support for images in questions and options
This commit is contained in:
parent
8bb07bd221
commit
a40cdb61e3
1 changed files with 2 additions and 0 deletions
|
@ -31,6 +31,7 @@ class BaseQuestion(BaseModel):
|
|||
question_type: QuestionType
|
||||
label: str = Field(min_length=1)
|
||||
description: str | None = Field(None, min_length=1)
|
||||
image_url: str | None
|
||||
required: bool = True
|
||||
|
||||
@field_serializer("id")
|
||||
|
@ -40,6 +41,7 @@ class BaseQuestion(BaseModel):
|
|||
|
||||
class Option(BaseModel):
|
||||
label: str
|
||||
image_url: str | None
|
||||
|
||||
|
||||
class TextQuestion(BaseQuestion):
|
||||
|
|
Loading…
Reference in a new issue