# Generated by Django 2.1.7 on 2019-05-03 16:42

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('events', '0002_auto_20190423_1827'),
    ]

    operations = [
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('icon', models.URLField()),
                ('is_active', models.BooleanField(default=True)),
                ('due_date', models.DateTimeField(blank=True, null=True)),
                ('available_from', models.DateTimeField(blank=True, null=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='events.Event')),
            ],
        ),
        migrations.CreateModel(
            name='RegistrantAttendance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('registered_at', models.DateTimeField(auto_now_add=True)),
                ('attendance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='events.Attendance')),
                ('registered_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('registrant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='events.Registrant')),
            ],
            options={
                'ordering': ['attendance'],
            },
        ),
        migrations.AlterUniqueTogether(
            name='registrantattendance',
            unique_together={('registrant', 'attendance')},
        ),
    ]
