# Generated by Django 2.2.5 on 2019-09-17 18:13

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BorderCrossing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now_add=True)),
                ('allowed', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Nationality',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nationality', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=256)),
                ('last_name', models.CharField(max_length=256)),
                ('date_of_birth', models.DateField()),
                ('living_address', models.CharField(max_length=256)),
                ('phone_number', models.CharField(max_length=15, validators=[django.core.validators.RegexValidator('^\\d{6,15}$')])),
                ('height', models.FloatField(validators=[django.core.validators.MinValueValidator(0.3), django.core.validators.MaxValueValidator(3.0)])),
                ('color_of_eyes', models.CharField(max_length=32)),
                ('married_to', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='democratic_api.Person')),
                ('nationality', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='democratic_api.Nationality')),
            ],
        ),
        migrations.CreateModel(
            name='ForbiddenStuff',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=256)),
                ('border_crossing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='democratic_api.BorderCrossing')),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='democratic_api.Person')),
            ],
        ),
        migrations.AddField(
            model_name='bordercrossing',
            name='person',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='democratic_api.Person'),
        ),
    ]
