support for images in questions and options

This commit is contained in:
grey-cat-1908 2024-08-19 09:01:35 +03:00 committed by GitHub
parent 8bb07bd221
commit a40cdb61e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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):