Activity system #3

Merged
tscholten merged 23 commits from tiago/activities into master 2026-10-17 15:51:00 +00:00
2 changed files with 51 additions and 0 deletions
Showing only changes of commit 4c62bc4de8 - Show all commits

View File

@ -10,6 +10,9 @@ class ActivityModel(CommunicationModel):
Field(pattern=CommunicationCategory.activity) Field(pattern=CommunicationCategory.activity)
] ]
slug: str
# unique short name used in the public URL
start_time: datetime start_time: datetime
end_time: datetime end_time: datetime

View File

@ -0,0 +1,48 @@
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?