# Generated by Django 3.0 on 2021-04-05 14:14

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='Votacao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=194, verbose_name='Nome Votação')),
                ('descricao', models.CharField(max_length=200, verbose_name='Nome completo')),
                ('anonimo', models.BooleanField(default=False, verbose_name='Pode ser anonimo')),
                ('voto_unico', models.BooleanField(default=False, verbose_name='Voto Unico')),
                ('data_inicio', models.DateField(verbose_name='Data de inicio')),
                ('data_termino', models.DateField(verbose_name='Data de termino')),
            ],
            options={
                'verbose_name': 'Votação',
                'verbose_name_plural': 'Votações',
            },
        ),
        migrations.CreateModel(
            name='Pessoa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_completo', models.CharField(max_length=194, verbose_name='Nome completo')),
                ('cpf', models.CharField(max_length=11, verbose_name='CPF')),
                ('data_nascimento', models.DateField(verbose_name='Data de nascimento')),
                ('email', models.EmailField(max_length=194, unique=True, verbose_name='Email do usuario')),
                ('usuario', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='usuario')),
            ],
            options={
                'verbose_name': 'Pessoa',
                'verbose_name_plural': 'Pessoas',
            },
        ),
        migrations.CreateModel(
            name='OpcaoVoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=194, verbose_name='Nome Opção de voto')),
                ('codigo', models.CharField(max_length=3, verbose_name='Codigo')),
                ('qtd_votos', models.IntegerField(verbose_name='Quantidade de votos')),
                ('votacao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Votacao', verbose_name='Votação')),
            ],
            options={
                'verbose_name': 'Opção de voto',
                'verbose_name_plural': 'Opçṍes de voto',
            },
        ),
    ]
