# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-15 13:27
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('person', '0001_initial'),
        ('parliament', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Agenda',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('agenda_id', models.CharField(blank=True, max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='AgendaItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_text', models.CharField(blank=True, max_length=100)),
                ('agenda', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.Agenda')),
            ],
        ),
        migrations.CreateModel(
            name='BesluitenLijst',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=300)),
                ('commission', models.CharField(max_length=50)),
                ('activity_id', models.CharField(max_length=100)),
                ('date_published', models.DateField()),
                ('url', models.URLField()),
            ],
            options={
                'ordering': ['-date_published'],
            },
        ),
        migrations.CreateModel(
            name='BesluitItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=300)),
                ('besluiten_lijst', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.BesluitenLijst')),
            ],
        ),
        migrations.CreateModel(
            name='BesluitItemCase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=300)),
                ('decisions', models.CharField(max_length=500)),
                ('notes', models.CharField(max_length=500)),
                ('related_commissions', models.CharField(max_length=500)),
                ('related_document_ids', models.CharField(max_length=300)),
                ('besluit_item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.BesluitItem')),
            ],
        ),
        migrations.CreateModel(
            name='CategoryDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('slug', models.SlugField(default='', max_length=250)),
            ],
            options={
                'verbose_name': 'Category (document)',
                'verbose_name_plural': 'Categories (document)',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='CategoryDossier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('slug', models.SlugField(default='', max_length=250)),
            ],
            options={
                'verbose_name': 'Category (dossier)',
                'verbose_name_plural': 'Categories (dossier)',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('document_id', models.CharField(blank=True, max_length=200)),
                ('title_full', models.CharField(max_length=500)),
                ('title_short', models.CharField(max_length=200)),
                ('publication_type', models.CharField(blank=True, max_length=200)),
                ('publisher', models.CharField(blank=True, max_length=200)),
                ('date_published', models.DateField(blank=True, null=True)),
                ('content_html', models.CharField(blank=True, max_length=200000)),
                ('categories', models.ManyToManyField(blank=True, to='document.CategoryDocument')),
            ],
            options={
                'ordering': ['-date_published'],
            },
        ),
        migrations.CreateModel(
            name='Dossier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dossier_id', models.CharField(blank=True, max_length=100, unique=True)),
                ('categories', models.ManyToManyField(blank=True, to='document.CategoryDossier')),
            ],
            options={
                'ordering': ['-dossier_id'],
            },
        ),
        migrations.CreateModel(
            name='Kamerstuk',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_main', models.CharField(blank=True, max_length=40)),
                ('id_sub', models.CharField(blank=True, max_length=40)),
                ('type_short', models.CharField(blank=True, max_length=40)),
                ('type_long', models.CharField(blank=True, max_length=100)),
                ('original_id', models.CharField(blank=True, max_length=40)),
                ('document', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.Document')),
            ],
            options={
                'verbose_name_plural': 'Kamerstukken',
                'ordering': ['-document__date_published', '-id_sub'],
            },
        ),
        migrations.CreateModel(
            name='Submitter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('document', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.Document')),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
            ],
        ),
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_of_seats', models.IntegerField()),
                ('decision', models.CharField(choices=[('FO', 'For'), ('AG', 'Against'), ('NO', 'None'), ('MI', 'Mistake')], max_length=2)),
                ('details', models.CharField(blank=True, default='', max_length=2000)),
            ],
        ),
        migrations.CreateModel(
            name='Voting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_dossier_voting', models.BooleanField(default=False)),
                ('result', models.CharField(choices=[('AAN', 'Aangenomen'), ('VER', 'Verworpen'), ('ING', 'Ingetrokken'), ('AGH', 'Aangehouden')], max_length=3)),
                ('date', models.DateField(blank=True)),
                ('dossier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.Dossier')),
                ('kamerstuk', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='document.Kamerstuk')),
            ],
        ),
        migrations.CreateModel(
            name='VoteIndividual',
            fields=[
                ('vote_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='document.Vote')),
                ('parliament_member', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parliament.ParliamentMember')),
            ],
            bases=('document.vote',),
        ),
        migrations.CreateModel(
            name='VoteParty',
            fields=[
                ('vote_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='document.Vote')),
                ('party', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='parliament.PoliticalParty')),
            ],
            bases=('document.vote',),
        ),
        migrations.AddField(
            model_name='vote',
            name='voting',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.Voting'),
        ),
        migrations.AddField(
            model_name='document',
            name='dossier',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='document.Dossier'),
        ),
        migrations.AddField(
            model_name='agendaitem',
            name='dossier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='document.Dossier'),
        ),
        migrations.AddField(
            model_name='agenda',
            name='document',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='document.Document'),
        ),
    ]
