mirror of
https://github.com/grey-cat-1908/formaptix-server.git
synced 2024-11-11 18:57:27 +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
|
question_type: QuestionType
|
||||||
label: str = Field(min_length=1)
|
label: str = Field(min_length=1)
|
||||||
description: str | None = Field(None, min_length=1)
|
description: str | None = Field(None, min_length=1)
|
||||||
|
image_url: str | None
|
||||||
required: bool = True
|
required: bool = True
|
||||||
|
|
||||||
@field_serializer("id")
|
@field_serializer("id")
|
||||||
|
@ -40,6 +41,7 @@ class BaseQuestion(BaseModel):
|
||||||
|
|
||||||
class Option(BaseModel):
|
class Option(BaseModel):
|
||||||
label: str
|
label: str
|
||||||
|
image_url: str | None
|
||||||
|
|
||||||
|
|
||||||
class TextQuestion(BaseQuestion):
|
class TextQuestion(BaseQuestion):
|
||||||
|
|
Loading…
Reference in a new issue