# Generated by Django 6.0.4 on 2026-06-06 02:55

import apps.events.models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contacts', '0002_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='RegistrationFormField',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('order', models.PositiveIntegerField(default=0)),
                ('type', models.CharField(choices=[('header', 'Header'), ('paragraph', 'Paragraph'), ('section', 'Section'), ('divider', 'Divider'), ('text', 'Short Text'), ('number', 'Number'), ('email', 'Email'), ('phone', 'Phone'), ('yes_no', 'Yes/No'), ('checkbox', 'Checkbox'), ('checklist', 'Checklist'), ('dropdown', 'Dropdown'), ('radio', 'Radio'), ('table', 'Table')], max_length=20)),
                ('label', models.CharField(blank=True, max_length=255)),
                ('placeholder', models.CharField(blank=True, max_length=255)),
                ('required', models.BooleanField(default=False)),
                ('options', models.JSONField(blank=True, default=list)),
                ('columns', models.PositiveIntegerField(blank=True, null=True)),
                ('meta', models.JSONField(blank=True, default=dict)),
            ],
            options={
                'db_table': 'registration_form_fields',
                'ordering': ['order', 'id'],
            },
        ),
        migrations.CreateModel(
            name='RegistrationFormSubmission',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('submitter_name', models.CharField(blank=True, max_length=255)),
                ('submitter_email', models.EmailField(blank=True, max_length=254)),
                ('answers', models.JSONField(blank=True, default=dict)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('reviewed', 'Reviewed'), ('approved', 'Approved'), ('rejected', 'Rejected')], default='pending', max_length=20)),
                ('auto_blocked', models.BooleanField(default=False)),
                ('block_reason', models.CharField(blank=True, max_length=500)),
                ('submitted_at', models.DateTimeField(auto_now_add=True)),
                ('reviewed_at', models.DateTimeField(blank=True, null=True)),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True)),
            ],
            options={
                'db_table': 'registration_form_submissions',
                'ordering': ['-submitted_at'],
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('event_type', models.CharField(choices=[('webinar', 'Webinar'), ('dissemination', 'Dissemination'), ('conference', 'Conference'), ('workshop', 'Workshop'), ('seminar', 'Seminar'), ('meeting', 'Meeting'), ('other', 'Other')], default='other', max_length=20)),
                ('description', models.TextField(blank=True)),
                ('start_date', models.DateTimeField()),
                ('end_date', models.DateTimeField()),
                ('location', models.CharField(blank=True, max_length=255)),
                ('status', models.CharField(choices=[('draft', 'Draft'), ('published', 'Published'), ('cancelled', 'Cancelled'), ('completed', 'Completed')], default='draft', max_length=20)),
                ('capacity', models.IntegerField(blank=True, null=True)),
                ('tags', models.JSONField(default=list)),
                ('settings', models.JSONField(default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('organizer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organized_events', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'events',
                'ordering': ['-start_date'],
            },
        ),
        migrations.CreateModel(
            name='EventBlocklist',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('email', models.EmailField(max_length=254)),
                ('name', models.CharField(blank=True, max_length=255)),
                ('reason', models.CharField(blank=True, max_length=500)),
                ('blocked_at', models.DateTimeField(auto_now_add=True)),
                ('blocked_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_blocklist_entries', to=settings.AUTH_USER_MODEL)),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='blocklist_entries', to='events.event')),
            ],
            options={
                'db_table': 'event_blocklist',
                'ordering': ['-blocked_at'],
            },
        ),
        migrations.CreateModel(
            name='EventDocument',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, max_length=255)),
                ('title', models.CharField(blank=True, max_length=255)),
                ('description', models.TextField(blank=True)),
                ('file', models.FileField(blank=True, null=True, upload_to='event_documents/')),
                ('file_size', models.PositiveBigIntegerField(default=0)),
                ('category', models.CharField(blank=True, max_length=100)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='events.event')),
                ('uploaded_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'event_documents',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='EventInvitation',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('email', models.EmailField(max_length=254)),
                ('name', models.CharField(max_length=255)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('accepted', 'Accepted'), ('declined', 'Declined'), ('tentative', 'Tentative')], default='pending', max_length=20)),
                ('responded_at', models.DateTimeField(blank=True, null=True)),
                ('check_in_time', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('contact', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='event_invitations', to='contacts.contact')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invitations', to='events.event')),
                ('invited_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'event_invitations',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='EventLog',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('action', models.CharField(max_length=100)),
                ('detail', models.TextField(blank=True)),
                ('log_type', models.CharField(choices=[('create', 'Created'), ('file', 'File'), ('task', 'Task'), ('invite', 'Invite'), ('rsvp', 'RSVP'), ('status', 'Status')], default='status', max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('actor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='events.event')),
            ],
            options={
                'db_table': 'event_logs',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='EventMedia',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('file', models.FileField(blank=True, null=True, upload_to='event_media/')),
                ('file_type', models.CharField(choices=[('image', 'Image'), ('video', 'Video'), ('document', 'Document')], default='image', max_length=20)),
                ('title', models.CharField(blank=True, max_length=255)),
                ('description', models.TextField(blank=True)),
                ('caption', models.CharField(blank=True, max_length=255)),
                ('is_cover', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='media', to='events.event')),
                ('uploaded_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'event_media',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='EventRegistration',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254)),
                ('phone', models.CharField(blank=True, max_length=50)),
                ('company', models.CharField(blank=True, max_length=255)),
                ('status', models.CharField(choices=[('registered', 'Registered'), ('checked_in', 'Checked In'), ('rejected', 'Rejected')], default='registered', max_length=20)),
                ('check_in_time', models.DateTimeField(blank=True, null=True)),
                ('registration_date', models.DateTimeField(auto_now_add=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('contact', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_registrations', to='contacts.contact')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registrations', to='events.event')),
            ],
            options={
                'db_table': 'event_registrations',
                'ordering': ['-registration_date'],
            },
        ),
        migrations.CreateModel(
            name='EventScheduleItem',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True)),
                ('session_type', models.CharField(choices=[('keynote', 'Keynote'), ('panel', 'Panel'), ('workshop', 'Workshop'), ('break', 'Break'), ('networking', 'Networking'), ('plenary', 'Plenary'), ('ceremony', 'Ceremony'), ('other', 'Other')], default='other', max_length=50)),
                ('track', models.CharField(default='Main Hall', max_length=100)),
                ('start_time', models.TimeField()),
                ('end_time', models.TimeField()),
                ('speaker_name', models.CharField(blank=True, max_length=255)),
                ('material_file', models.CharField(blank=True, max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='schedule_items', to='events.event')),
                ('speaker', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_schedule_appearances', to='contacts.contact')),
            ],
            options={
                'db_table': 'event_schedule_items',
                'ordering': ['start_time', 'track'],
            },
        ),
        migrations.CreateModel(
            name='EventSpeaker',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('title', models.CharField(blank=True, max_length=255)),
                ('organization', models.CharField(blank=True, max_length=255)),
                ('bio', models.TextField(blank=True)),
                ('session_title', models.CharField(blank=True, max_length=255)),
                ('session_type', models.CharField(choices=[('keynote', 'Keynote'), ('panel', 'Panel'), ('workshop', 'Workshop'), ('break', 'Break'), ('networking', 'Networking'), ('plenary', 'Plenary'), ('ceremony', 'Ceremony'), ('other', 'Other')], default='other', max_length=50)),
                ('start_time', models.TimeField(blank=True, null=True)),
                ('end_time', models.TimeField(blank=True, null=True)),
                ('material_status', models.CharField(choices=[('pending', 'Pending'), ('uploaded', 'Uploaded'), ('not_required', 'Not Required')], default='pending', max_length=20)),
                ('material_file', models.FileField(blank=True, null=True, upload_to='speaker_materials/')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('contact', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_speaker_appearances', to='contacts.contact')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='speakers', to='events.event')),
            ],
            options={
                'db_table': 'event_speakers',
                'ordering': ['start_time', 'created_at'],
            },
        ),
        migrations.CreateModel(
            name='EventTeam',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('role', models.CharField(default='member', max_length=50)),
                ('is_lead', models.BooleanField(default=False)),
                ('joined_at', models.DateTimeField(auto_now_add=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='teams', to='events.event')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='event_teams', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'event_teams',
                'ordering': ['-joined_at'],
            },
        ),
        migrations.CreateModel(
            name='EventTemplate',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('event_type', models.CharField(choices=[('webinar', 'Webinar'), ('dissemination', 'Dissemination'), ('conference', 'Conference'), ('workshop', 'Workshop'), ('seminar', 'Seminar'), ('meeting', 'Meeting'), ('other', 'Other')], max_length=20)),
                ('description', models.TextField(blank=True)),
                ('duration_hours', models.DecimalField(decimal_places=1, max_digits=4)),
                ('default_settings', models.JSONField(default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'event_templates',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='InvitationTemplate',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('category', models.CharField(choices=[('formal', 'Formal Corporate'), ('casual', 'Casual / Friendly'), ('reminder', 'Reminder'), ('confirmation', 'Confirmation / RSVP'), ('other', 'Other')], default='formal', max_length=20)),
                ('description', models.TextField(blank=True)),
                ('design', models.JSONField(default=dict)),
                ('thumbnail', models.ImageField(blank=True, null=True, upload_to='invitation_templates/')),
                ('is_default', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'invitation_templates',
                'ordering': ['category', 'name'],
            },
        ),
        migrations.CreateModel(
            name='RegistrationForm',
            fields=[
                ('id', models.UUIDField(default=apps.events.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True)),
                ('source', models.CharField(choices=[('public', 'Public'), ('project', 'Project')], default='public', max_length=20)),
                ('status', models.CharField(choices=[('draft', 'Draft'), ('published', 'Published'), ('closed', 'Closed')], default='draft', max_length=20)),
                ('config', models.JSONField(blank=True, default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_registration_forms', to=settings.AUTH_USER_MODEL)),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='registration_forms', to='events.event')),
            ],
            options={
                'db_table': 'registration_forms',
                'ordering': ['-updated_at'],
            },
        ),
    ]
