feat: add questionnaire definitions and their catalog

This commit is contained in:
fromme committed 2026-10-27 16:41:46 +01:00
1 parent 2ec2a4c93f
commit a84275b40e
12 files changed
+1136

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Enum;
/**
* The kinds of question a questionnaire definition may use. Each maps to exactly one form field
* in QuestionnaireType; adding one means a case here and a line there, nothing more.
*/
enum QuestionType: string
{
case TEXT = 'text';
case TEXTAREA = 'textarea';
case CHOICE = 'choice';
case MULTI = 'multi';
case DATE = 'date';
case RATING = 'rating';
public function hasOptions(): bool
{
return self::CHOICE === $this || self::MULTI === $this;
}
}