# Generated by Django 3.0.6 on 2020-07-11 10:54

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import wagtail.core.fields


class Migration(migrations.Migration):

    replaces = [('agenda', '0001_squashed_0008_auto_20200504_2015'), ('agenda', '0009_auto_20200526_2322_squashed_0021_sociallink'), ('agenda', '0010_auto_20200528_1605')]

    initial = True

    dependencies = [
        ('wagtailcore', '0045_assign_unlock_grouppagepermission'),
        ('wagtailforms', '0004_add_verbose_name_plural'),
        ('wagtailimages', '0001_squashed_0021'),
        ('wagtailimages', '0022_uploadedimage'),
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('wagtailredirects', '0006_redirect_increase_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='SpeakerIndex',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='featured image')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'speakers index',
                'verbose_name_plural': 'speakers indexes',
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='EditionIndex',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='featured image')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'edition index',
                'verbose_name_plural': 'edition indexes',
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='EventIndex',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='featured image')),
                ('color', models.CharField(default='#23211f', max_length=7, validators=[django.core.validators.RegexValidator(message='Color must be in hex', regex='^#([0-9a-fA-F]{6})$')], verbose_name='color')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'event list',
                'verbose_name_plural': 'event lists',
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='Edition',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('start_date', models.DateTimeField(blank=True, null=True, verbose_name='edition start date')),
                ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='featured image')),
                ('end_date', models.DateTimeField(blank=True, null=True, verbose_name='edition end date')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'edition',
                'verbose_name_plural': 'editions',
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='Sponsor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='name')),
                ('logo', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='logo')),
            ],
            options={
                'verbose_name': 'sponsor',
                'verbose_name_plural': 'sponsors',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='name')),
                ('name_en', models.CharField(max_length=100, null=True, verbose_name='name')),
                ('name_pl', models.CharField(max_length=100, null=True, verbose_name='name')),
                ('icon', models.CharField(max_length=300, verbose_name='icon')),
                ('color', models.CharField(default='#23211f', max_length=7, validators=[django.core.validators.RegexValidator(message='Color must be in hex', regex='^#([0-9a-fA-F]{6})$')], verbose_name='color')),
                ('edition', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='event_categories', to='agenda.Edition', verbose_name='edition')),
            ],
            options={
                'verbose_name': 'event category',
                'verbose_name_plural': 'event categories',
            },
        ),
        migrations.CreateModel(
            name='Speaker',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('content', wagtail.core.fields.RichTextField(verbose_name='content')),
                ('content_en', wagtail.core.fields.RichTextField(null=True, verbose_name='content')),
                ('content_pl', wagtail.core.fields.RichTextField(null=True, verbose_name='content')),
                ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='featured image')),
                ('sponsor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='agenda.Sponsor', verbose_name='sponsor')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'speaker',
                'verbose_name_plural': 'speakers',
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('content', wagtail.core.fields.RichTextField(verbose_name='content')),
                ('date', models.DateTimeField(blank=True, null=True, verbose_name='date')),
                ('event_speaker', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='agenda.Speaker', verbose_name='speaker')),
                ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='featured image')),
                ('content_en', wagtail.core.fields.RichTextField(null=True, verbose_name='content')),
                ('content_pl', wagtail.core.fields.RichTextField(null=True, verbose_name='content')),
                ('sponsor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='agenda.Sponsor', verbose_name='sponsor')),
                ('recording', models.URLField(blank=True, max_length=512, null=True, verbose_name='link to recording')),
                ('event_category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='agenda.Category', verbose_name='category')),
                ('duration_minutes', models.IntegerField(blank=True, null=True, verbose_name='duration in minutes')),
                ('language', models.CharField(blank=True, choices=[('pl', 'Polish'), ('en', 'English')], max_length=5, null=True, verbose_name='language')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'event',
                'verbose_name_plural': 'events',
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='SocialLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('facebook', 'Facebook'), ('twitter', 'Twitter'), ('github', 'Github'), ('instagram', 'Instagram'), ('linkedin', 'Linkedin'), ('email', 'Email'), ('site', 'Website'), ('other', 'Other')], default='other', max_length=16, verbose_name='type')),
                ('link', models.URLField(max_length=512, verbose_name='link')),
                ('speaker', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='social_links', to='agenda.Speaker')),
            ],
        ),
    ]
