# Generated by Django 5.2.7 on 2026-04-12 07:26

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=180)),
                ('slug', models.SlugField(blank=True, max_length=200, unique=True)),
                ('summary', models.CharField(max_length=260)),
                ('description', models.TextField()),
                ('venue', models.CharField(max_length=180)),
                ('start_at', models.DateTimeField()),
                ('end_at', models.DateTimeField()),
                ('capacity', models.PositiveIntegerField(blank=True, null=True)),
                ('is_published', models.BooleanField(default=True)),
                ('registration_opens', models.DateTimeField(blank=True, null=True)),
                ('registration_closes', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['start_at'],
            },
        ),
        migrations.CreateModel(
            name='Registration',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=160)),
                ('email', models.EmailField(max_length=254)),
                ('company', models.CharField(blank=True, max_length=160)),
                ('notes', models.TextField(blank=True)),
                ('status', models.CharField(choices=[('confirmed', 'Confirmed'), ('waitlist', 'Waitlist')], default='confirmed', max_length=24)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registrations', to='core.event')),
            ],
            options={
                'ordering': ['created_at'],
                'constraints': [models.UniqueConstraint(fields=('event', 'email'), name='unique_registration_per_event_email')],
            },
        ),
    ]
