improve surverys

This commit is contained in:
Ross
2026-06-29 09:35:12 +01:00
parent 79ba4db4bf
commit c34dcdfd5e
26 changed files with 911 additions and 39 deletions
@@ -0,0 +1,43 @@
# Generated by Django 6.0.1 on 2026-06-29 08:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('survey', '0002_survey_author_survey_authors_only'),
]
operations = [
migrations.AddField(
model_name='survey',
name='after_text',
field=models.TextField(blank=True, help_text='Text shown to the user after they complete the survey'),
),
migrations.AddField(
model_name='survey',
name='before_text',
field=models.TextField(blank=True, help_text='Text shown to the user before they start the survey'),
),
migrations.AddField(
model_name='surveyanswer',
name='date_answer',
field=models.DateField(blank=True, null=True),
),
migrations.AddField(
model_name='surveyanswer',
name='integer_answer',
field=models.IntegerField(blank=True, null=True),
),
migrations.AddField(
model_name='surveyquestion',
name='validation_rules',
field=models.JSONField(blank=True, default=dict, help_text='Extensible validation rules in JSON format (e.g. min_value, max_value, min_date, max_date)', null=True),
),
migrations.AlterField(
model_name='surveyquestion',
name='question_type',
field=models.CharField(choices=[('TEXT', 'Free Text'), ('CHOICE', 'Multiple Choice (Single Option)'), ('RATING', 'Rating (1-5 Likert scale)'), ('INTEGER', 'Integer / Number'), ('DATE', 'Date')], default='TEXT', max_length=20),
),
]