# Generated by Django 2.0.7 on 2018-11-18 11:44

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import webapp.utils


class Migration(migrations.Migration):

    dependencies = [
        ('webapp', '0048_auto_20181118_1336'),
    ]

    operations = [
        migrations.CreateModel(
            name='BaseFeed',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('visible', models.BooleanField(default=True)),
                ('title', models.CharField(max_length=255)),
                ('title_fi', models.CharField(max_length=255, null=True)),
                ('title_en', models.CharField(max_length=255, null=True)),
                ('description', models.CharField(max_length=255)),
                ('description_fi', models.CharField(max_length=255, null=True)),
                ('description_en', models.CharField(max_length=255, null=True)),
                ('content', models.TextField()),
                ('content_fi', models.TextField(null=True)),
                ('content_en', models.TextField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('name', models.CharField(max_length=127)),
                ('name_fi', models.CharField(max_length=127, null=True)),
                ('name_en', models.CharField(max_length=127, null=True)),
                ('icon', models.ImageField(upload_to='')),
            ],
            options={
                'verbose_name': 'Tag',
                'verbose_name_plural': 'Tags',
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('basefeed_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='webapp.BaseFeed')),
                ('start_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('end_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('signupForm', models.ManyToManyField(blank=True, to='webapp.SignupForm')),
            ],
            options={
                'verbose_name': 'Event',
                'verbose_name_plural': 'Events',
            },
            bases=('webapp.basefeed',),
        ),
        migrations.CreateModel(
            name='Feed',
            fields=[
                ('basefeed_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='webapp.BaseFeed')),
                ('publish_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('autohide', models.DateTimeField(default=webapp.utils.month_from_now)),
            ],
            options={
                'verbose_name': 'Feed',
                'verbose_name_plural': 'Feeds',
            },
            bases=('webapp.basefeed',),
        ),
        migrations.AddField(
            model_name='basefeed',
            name='tags',
            field=models.ManyToManyField(blank=True, related_name='feeds', to='webapp.Tag'),
        ),
    ]
