# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-21 00:30
from __future__ import unicode_literals

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='Candidato',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantidade', models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Eleicao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100)),
                ('dataInicio', models.DateTimeField(blank=True, null=True)),
                ('dataFinal', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Eleitor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100)),
                ('cargo', models.CharField(max_length=100)),
                ('setor', models.CharField(max_length=100)),
                ('usuario', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Resultado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('votosBrancos', models.IntegerField(null=True)),
                ('candidato', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='urna.Candidato')),
            ],
        ),
        migrations.CreateModel(
            name='Vaga',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cargo', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Votar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('Valido', 'Votou'), ('branco', 'Voto em Branco')], default='votou', max_length=20)),
                ('candidato', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='urna.Eleitor')),
                ('eleicao', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='urna.Eleicao')),
            ],
        ),
        migrations.AddField(
            model_name='candidato',
            name='candidato',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='urna.Eleitor'),
        ),
        migrations.AddField(
            model_name='candidato',
            name='vaga',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='urna.Vaga'),
        ),
    ]
