# Generated by Django 2.2.1 on 2019-12-08 14:37

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Anno',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('anno', models.IntegerField(default=2000)),
                ('preview', models.ImageField(blank=True, null=True, upload_to='images/preview/')),
                ('title', models.CharField(blank=True, max_length=240, null=True)),
                ('color', models.CharField(blank=True, max_length=240, null=True)),
                ('content', models.TextField(blank=True, max_length=240, null=True)),
            ],
            options={
                'verbose_name': 'Anno',
                'verbose_name_plural': 'Anni',
            },
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=240)),
                ('content', models.TextField(max_length=240)),
                ('datainizio', models.DateTimeField(blank=True)),
                ('datafine', models.DateTimeField(blank=True, null=True)),
                ('luogo', models.CharField(max_length=240)),
                ('partecipants', models.IntegerField(default=0)),
                ('fotografieconteggio', models.IntegerField(default=0)),
                ('preview', models.ImageField(blank=True, null=True, upload_to='images/preview/')),
                ('anno', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='eventianno', to='events.Anno')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='eventi', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Evento',
                'verbose_name_plural': 'Eventi',
            },
        ),
        migrations.CreateModel(
            name='Scatti',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descrizione', models.CharField(max_length=240)),
                ('picture', models.FileField(upload_to='images/')),
            ],
            options={
                'verbose_name': 'Scatto',
                'verbose_name_plural': 'Scatti',
            },
        ),
        migrations.CreateModel(
            name='EventoFoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('isFirst', models.BooleanField(default=False, null=True)),
                ('descrizione', models.CharField(max_length=240)),
                ('data', models.DateTimeField(blank=True, null=True)),
                ('luogo', models.CharField(blank=True, max_length=240)),
                ('picture', models.ImageField(blank=True, null=True, upload_to='images/')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('evento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fotografieevento', to='events.Evento')),
            ],
            options={
                'verbose_name': 'Illustrazione',
                'verbose_name_plural': 'Illustrazioni',
            },
        ),
    ]
