# Generated by Django 3.2.13 on 2024-10-26 08:48

import ddm.projects.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.SeparateDatabaseAndState(
            state_operations=[
                migrations.CreateModel(
                    name='ResearchProfile',
                    fields=[
                        ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                        ('active', models.BooleanField(default=True)),
                        ('created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date registered')),
                        ('ignore_email_restriction', models.BooleanField(default=False)),
                        ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='ddm_research_profile', to=settings.AUTH_USER_MODEL)),
                    ],
                ),
                migrations.CreateModel(
                    name='DonationProject',
                    fields=[
                        ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                        ('name', models.CharField(help_text='Project Name - for internal organisation only (can still be changed later).', max_length=50)),
                        ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
                        ('contact_information', models.TextField(help_text='Please provide the contact information of the person responsible for the conduction of this study (Name, professional address, e-mail, tel, ...). The contact information will be accessible for participants during the data donation. The field is mandatory.', null=True, verbose_name='Contact information')),
                        ('data_protection_statement', models.TextField(help_text='Please provide a data protection statement for your data donation collection. This should include the purpose for which the data is collected, how it will be stored, and who will have access to the data. The field is mandatory.', null=True, verbose_name='Data Protection Statement')),
                        ('slug', models.SlugField(help_text='Identifier that is included in the URL through which participants can access the project (e.g, https://root.url/url-identifier).', unique=True, verbose_name='URL Identifier')),
                        ('briefing_text', models.TextField(blank=True, help_text='This text will be displayed to participants in the first step before beginning the data donation. Here, you should introduce your study, who is responsible for the study, provide a quick summary of what your participants will be asked to do in the next steps, etc.', null=True, verbose_name='Briefing Text')),
                        ('briefing_consent_enabled', models.BooleanField(default=False, help_text='Enable this option to obtain explicit consent from participant, that they want to start the study.', verbose_name='Briefing Consent Mandatory')),
                        ('briefing_consent_label_yes', models.CharField(blank=True, max_length=255)),
                        ('briefing_consent_label_no', models.CharField(blank=True, max_length=255)),
                        ('debriefing_text', models.TextField(blank=True, help_text='This text will be displayed to participants on the last page of the study (i.e., after the data donation and the questionnaire).', null=True, verbose_name='Debriefing Text')),
                        ('img_header_left', models.ImageField(blank=True, null=True, upload_to=ddm.projects.models.project_header_dir_path, verbose_name='Header Image Left')),
                        ('img_header_right', models.ImageField(blank=True, null=True, upload_to=ddm.projects.models.project_header_dir_path, verbose_name='Header Image Right')),
                        ('public_key', models.BinaryField()),
                        ('super_secret', models.BooleanField(default=False)),
                        ('redirect_enabled', models.BooleanField(default=False, verbose_name='Redirect enabled')),
                        ('redirect_target', models.CharField(blank=True, help_text='Always include <i>http://</i> or <i>https://</i> in the redirect target. If URL parameter extraction is enabled for this project, you can include the extracted URL parameters in the redirect target as follows: "https://redirect.me/?redirectpara=<b>{{participant.data.url_param.URLParameter}}</b>".', max_length=2000, verbose_name='Redirect target')),
                        ('url_parameter_enabled', models.BooleanField(default=False, verbose_name='URL parameter extraction enabled')),
                        ('expected_url_parameters', models.CharField(blank=True, help_text='Separate multiple parameters with a semikolon (";"). Semikolons are not allowed as part of the expected url parameters.', max_length=500, verbose_name='Expected URL parameter')),
                        ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='project_owner', to='ddm_projects.researchprofile')),
                    ],
                ),
            ],
            # Tables already exist. See ddm/migrations/0056.
            database_operations=[]
        )
    ]
