# Generated by Django 2.2.5 on 2019-11-22 09:43

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('categoria', models.CharField(max_length=50, verbose_name='Categoria')),
            ],
        ),
        migrations.CreateModel(
            name='Envolvidos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=200, verbose_name='Nome')),
            ],
        ),
        migrations.CreateModel(
            name='Formato',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('formato', models.CharField(max_length=6, verbose_name='Formato')),
            ],
        ),
        migrations.CreateModel(
            name='Jornal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='Nome do Jornal')),
                ('email', models.CharField(max_length=100, verbose_name='e-Mail do Jornal')),
                ('site', models.CharField(max_length=100, verbose_name='site do Jornal')),
            ],
        ),
        migrations.CreateModel(
            name='Linguagem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lingua', models.CharField(default='Português-Br', max_length=30, verbose_name='Linguagem')),
            ],
        ),
        migrations.CreateModel(
            name='Producao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(help_text='Nome da produção', max_length=300, verbose_name='Título')),
                ('descricao', models.TextField(blank=True, verbose_name='Descrição')),
                ('data', models.DateField(default=django.utils.timezone.now, help_text='Use formato dd/mm/AAAA', verbose_name='Data do Documento')),
                ('accepted', models.BooleanField(choices=[(True, 'Sim'), (False, 'Nao')], default=False, verbose_name='Accept file')),
                ('file', models.FileField(blank=True, upload_to='producoes/')),
                ('url', models.URLField(blank=True, verbose_name='URL para Documento')),
                ('categoria', models.ForeignKey(on_delete=models.SET('Não categorizado'), to='onlibrary.Categoria')),
                ('formato', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Formato')),
                ('jornal', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Jornal')),
                ('linguagem', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Linguagem')),
            ],
        ),
        migrations.CreateModel(
            name='Tema',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tema', models.CharField(max_length=60, verbose_name='Tema')),
            ],
        ),
        migrations.CreateModel(
            name='Tipo_midia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(help_text='Nome da produção', max_length=300, verbose_name='Título')),
            ],
        ),
        migrations.CreateModel(
            name='Tema_producao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('producao', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Producao')),
                ('tema', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Tema')),
            ],
        ),
        migrations.AddField(
            model_name='formato',
            name='midia',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Tipo_midia'),
        ),
        migrations.CreateModel(
            name='Envolvidos_producao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(help_text='Papeis no desenvolvimento da produção', max_length=300, verbose_name='Roles')),
                ('envolvido', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Envolvidos')),
                ('producao', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='onlibrary.Producao')),
            ],
        ),
    ]
