# Generated by Django 3.0.3 on 2020-03-13 23:35

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')),
                ('nome', models.CharField(blank=True, max_length=128, null=True, verbose_name='Nome')),
                ('sigla', models.CharField(blank=True, max_length=128, null=True, verbose_name='Sigla')),
                ('data_publicacao', models.DateTimeField(blank=True, null=True, verbose_name='Data inicial')),
                ('descricao', models.TextField(verbose_name='Descrição')),
            ],
            options={
                'verbose_name': 'Evento',
                'verbose_name_plural': 'Eventos',
            },
        ),
        migrations.CreateModel(
            name='Ingresso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao', models.CharField(max_length=128, verbose_name='Descrição')),
                ('valor', models.FloatField(verbose_name='Valor')),
                ('evento', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_evento.Evento', verbose_name='Evento')),
            ],
        ),
        migrations.CreateModel(
            name='Pessoa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=128, verbose_name='Nome')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='E-mail')),
                ('usuario', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Usuário')),
            ],
        ),
        migrations.CreateModel(
            name='Pfisica',
            fields=[
                ('pessoa_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='app_evento.Pessoa')),
                ('cpf', models.IntegerField(max_length=11, verbose_name='CPF')),
            ],
            bases=('app_evento.pessoa',),
        ),
        migrations.CreateModel(
            name='Inscrição',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('evento', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_evento.Evento', verbose_name='Evento')),
                ('ingresso', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_evento.Ingresso', verbose_name='Ingresso')),
                ('pessoa', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_evento.Pessoa', verbose_name='Pessoa')),
            ],
        ),
        migrations.AddField(
            model_name='evento',
            name='realizador',
            field=models.ForeignKey(blank=True, max_length=128, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_evento.Pessoa', verbose_name='Realizador'),
        ),
    ]
