49 lines
1.0 KiB
Plaintext
49 lines
1.0 KiB
Plaintext
Okay some ideas:
|
|
|
|
We want a modular system.
|
|
A signup form = list of signup questions
|
|
A signup = list of signup answers
|
|
|
|
|
|
Examples of questions:
|
|
* Dietary restrictions
|
|
* Insurance info
|
|
* Pick option from list
|
|
* Team (interesting one, as people can also make new teams)
|
|
|
|
|
|
class SignupQuestion
|
|
--> SignupQuestionDiet, SignupQuestionInsurance, SignupQuestionOption ....
|
|
Questions differentiate through enum question_type
|
|
Questions can have parameters like Option
|
|
|
|
--------------
|
|
|
|
Every SignupQuestionXYZ has a SignupAnswerXYZ
|
|
|
|
|
|
An activity consists of:
|
|
* usual event stuff, email, max_attendees, ....
|
|
* a slug!
|
|
* dict of SignupQuestions
|
|
* list of QuestionOrder
|
|
|
|
A signup then consists of:
|
|
* ActivityRef (what activity)
|
|
* EntityRef (who signed up)
|
|
* optional payment_id
|
|
* optional is_reserve
|
|
* optional confirmed (true if paid)
|
|
* dict of SignupAnswers
|
|
|
|
--------------
|
|
|
|
When saving a signup, we check:
|
|
* get activity
|
|
* is person allowed to sign up?
|
|
* do we have enough signup answers
|
|
* for every answer: does answer validate type of question?
|
|
|
|
|
|
|