# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-20 22:49
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Deputy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('outbuilding', models.IntegerField()),
                ('budget_id', models.IntegerField(null=True)),
                ('condition', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('phone', models.CharField(max_length=15)),
                ('cabinet', models.IntegerField()),
                ('parliamentary_id', models.IntegerField()),
                ('enrollment_id', models.IntegerField()),
                ('name', models.CharField(max_length=150)),
                ('parliamentary_name', models.CharField(max_length=100)),
                ('gender', models.CharField(max_length=50)),
                ('region', models.CharField(max_length=2)),
                ('photo_url', models.URLField()),
                ('parliamentary_seat_leader', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name_plural': 'Deputies',
                'verbose_name': 'Deputy',
            },
        ),
        migrations.CreateModel(
            name='LegislativeBody',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('initials', models.CharField(max_length=10)),
                ('description', models.TextField()),
            ],
            options={
                'verbose_name_plural': 'Legislative Bodies',
                'verbose_name': 'Legislative Body',
            },
        ),
        migrations.CreateModel(
            name='LegislativeBodyMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deputy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comissions', to='camara_deputados.Deputy')),
                ('legislative_body', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='camara_deputados.LegislativeBody')),
            ],
            options={
                'verbose_name_plural': 'Legislative Body Members',
                'verbose_name': 'Legislative Body Member',
            },
        ),
        migrations.CreateModel(
            name='LegislativeBodyRole',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name_plural': 'Legislative Body Roles',
                'verbose_name': 'Legislative Body Role',
            },
        ),
        migrations.CreateModel(
            name='LegislativeBodyType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name_plural': 'Legislative Body Types',
                'verbose_name': 'Legislative Body Type',
            },
        ),
        migrations.CreateModel(
            name='ParliamentarySeat',
            fields=[
                ('name', models.CharField(max_length=150)),
                ('initials', models.CharField(max_length=20, primary_key=True, serialize=False)),
            ],
            options={
                'verbose_name_plural': 'Parliamentary Seats',
                'verbose_name': 'Parliamentary Seat',
            },
        ),
        migrations.CreateModel(
            name='Party',
            fields=[
                ('creation_date', models.DateField(null=True)),
                ('extinction_date', models.DateField(null=True)),
                ('name', models.CharField(max_length=100)),
                ('initials', models.CharField(max_length=20, primary_key=True, serialize=False)),
            ],
            options={
                'verbose_name_plural': 'Parties',
                'verbose_name': 'Party',
            },
        ),
        migrations.CreateModel(
            name='PartyBloc',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateField(null=True)),
                ('extinction_date', models.DateField(null=True)),
                ('name', models.CharField(max_length=100)),
                ('initials', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name_plural': 'Party Blocs',
                'verbose_name': 'Party Bloc',
            },
        ),
        migrations.CreateModel(
            name='PartyBlocMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('adhesion_date', models.DateField(null=True)),
                ('shutdown_date', models.DateField(null=True)),
                ('party', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='party_blocs', to='camara_deputados.Party')),
                ('party_bloc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='camara_deputados.PartyBloc')),
            ],
            options={
                'verbose_name_plural': 'Party Bloc Members',
                'verbose_name': 'Party Bloc Member',
            },
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('code', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('number', models.IntegerField()),
            ],
            options={
                'verbose_name_plural': 'Sessions',
                'verbose_name': 'Session',
            },
        ),
        migrations.CreateModel(
            name='SessionPhase',
            fields=[
                ('code', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('description', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name_plural': 'Session Phases',
                'verbose_name': 'Session Phase',
            },
        ),
        migrations.CreateModel(
            name='SessionType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name_plural': 'Session Types',
                'verbose_name': 'SessionType',
            },
        ),
        migrations.CreateModel(
            name='Speech',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('initial_time', models.DateTimeField()),
                ('insertion_number', models.IntegerField()),
                ('quarter_number', models.IntegerField()),
                ('order', models.IntegerField()),
                ('full_text', models.TextField()),
                ('summary', models.TextField(null=True)),
                ('indexes', models.TextField(null=True)),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='speeches', to='camara_deputados.Deputy')),
                ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='speeches', to='camara_deputados.Session')),
                ('session_phase', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='speeches', to='camara_deputados.SessionPhase')),
            ],
            options={
                'verbose_name_plural': 'Speeches',
                'verbose_name': 'Speech',
            },
        ),
        migrations.AddField(
            model_name='session',
            name='session_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='camara_deputados.SessionType'),
        ),
        migrations.AddField(
            model_name='partybloc',
            name='members',
            field=models.ManyToManyField(through='camara_deputados.PartyBlocMember', to='camara_deputados.Party'),
        ),
        migrations.AddField(
            model_name='legislativebodymember',
            name='role',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='camara_deputados.LegislativeBodyRole'),
        ),
        migrations.AddField(
            model_name='legislativebody',
            name='legislative_body_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='camara_deputados.LegislativeBodyType'),
        ),
        migrations.AddField(
            model_name='legislativebody',
            name='members',
            field=models.ManyToManyField(through='camara_deputados.LegislativeBodyMember', to='camara_deputados.Deputy'),
        ),
        migrations.AddField(
            model_name='deputy',
            name='parliamentary_seat',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='members', to='camara_deputados.ParliamentarySeat'),
        ),
        migrations.AddField(
            model_name='deputy',
            name='party',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='members', to='camara_deputados.Party'),
        ),
    ]
