# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-08-10 13:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(
            settings.FILINGCABINET_DOCUMENTCOLLECTION_MODEL
        ),
        migrations.swappable_dependency(settings.FILINGCABINET_DOCUMENT_MODEL),
        ("filingcabinet", "0002_documentcollection"),
    ]

    operations = [
        migrations.CreateModel(
            name="CollectionDocument",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="documentcollection",
            name="documents",
            field=models.ManyToManyField(
                blank=True,
                related_name="filingcabinet_documentcollection",
                through="filingcabinet.CollectionDocument",
                to=settings.FILINGCABINET_DOCUMENT_MODEL,
            ),
        ),
        migrations.AddField(
            model_name="collectiondocument",
            name="collection",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="filingcabinet_collectiondocument",
                to=settings.FILINGCABINET_DOCUMENTCOLLECTION_MODEL,
            ),
        ),
        migrations.AddField(
            model_name="collectiondocument",
            name="document",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="filingcabinet_collectiondocument",
                to=settings.FILINGCABINET_DOCUMENT_MODEL,
            ),
        ),
    ]
