# Generated by Django 2.0 on 2018-03-15 18:39

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='Evento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=100)),
                ('descricao', models.CharField(max_length=2000)),
                ('data_evento', models.DateField()),
                ('local', models.CharField(max_length=100)),
                ('valor', models.CharField(max_length=20)),
                ('img_principal', models.ImageField(upload_to='eventos/main/%Y/%m/%d')),
            ],
        ),
        migrations.CreateModel(
            name='Imagem_evento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('imagem', models.ImageField(upload_to='eventos/%Y/%m/%d')),
                ('evento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='evento', to='core.Evento')),
            ],
        ),
        migrations.CreateModel(
            name='Imagens_noticia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('imagem', models.ImageField(upload_to='noticias/%Y/%m/%d')),
                ('legenda', models.CharField(max_length=30)),
                ('data_upload', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Noticia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=100)),
                ('data_criacao', models.DateTimeField(auto_now_add=True)),
                ('primeiro_paragrafo', models.CharField(max_length=1000)),
                ('segundo_paragrafo', models.CharField(max_length=1000, null=True)),
                ('consideração_final', models.CharField(max_length=100, null=True)),
                ('autor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='noticia', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='imagens_noticia',
            name='noticia',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='noticia', to='core.Noticia'),
        ),
    ]
