tfse-app-api-v0.2/Objects/InProject/Rating/question.py

31 lines
726 B
Python
Raw Permalink Normal View History

2022-04-15 17:02:30 +08:00
from Utils.ObjUtil import SpecObject
from Utils.ValidateUtil import ValidateAttr
class SingleChoiceQuestion(SpecObject):
"""单选题"""
2022-04-18 16:52:54 +08:00
in_list = []
question = ValidateAttr(field='question', in_list=in_list, type=str, default=None)
fields_map = {
"question": "问卷答案"
}
2022-04-15 17:02:30 +08:00
class MultipleChoiceQuestion(SpecObject):
"""多选题"""
2022-04-18 16:52:54 +08:00
in_list = []
question = ValidateAttr(field='question', in_list=in_list, type=list, default=None)
fields_map = {
"question": "问卷答案"
}
2022-04-15 17:02:30 +08:00
class FillInTheBlank(SpecObject):
"""填空题"""
2022-04-18 16:52:54 +08:00
question = ValidateAttr(field='question', type=float, default=None)
fields_map = {
"question": "问卷答案"
}