# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-03 18:51
from __future__ import unicode_literals

import datetime

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Law",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("text", models.TextField(blank=True)),
                ("title", models.CharField(default="Some law title", max_length=200)),
                ("slug", models.SlugField(max_length=200)),
                ("enbez", models.CharField(blank=True, max_length=200)),
                ("amtabk", models.CharField(blank=True, max_length=200, null=True)),
                ("kurzue", models.CharField(blank=True, max_length=200, null=True)),
                ("doknr", models.CharField(blank=True, max_length=200, null=True)),
                ("footnotes", models.TextField(blank=True, null=True)),
                ("order", models.PositiveSmallIntegerField(default=0)),
                ("foo", models.TextField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name="LawBook",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("code", models.CharField(max_length=100, null=True, unique=True)),
                ("title", models.CharField(default="Some book title", max_length=200)),
                ("slug", models.SlugField(max_length=200)),
                ("order", models.PositiveSmallIntegerField(default=0)),
                ("revision_date", models.DateField(default=datetime.date(1990, 1, 1))),
                ("changelog", models.TextField(blank=True, default="[]")),
                ("footnotes", models.TextField(blank=True, default="[]")),
                ("sections", models.TextField(blank=True, default="{}")),
            ],
        ),
        migrations.AddField(
            model_name="law",
            name="book",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to="laws.LawBook"
            ),
        ),
        migrations.AddField(
            model_name="law",
            name="previous",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="previous_law",
                to="laws.Law",
            ),
        ),
    ]
