# Generated by Django 3.1.3 on 2022-01-14 08:36

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Deadline',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('type', models.CharField(blank=True, choices=[('finished', 'Finished'), ('maintain', 'Maintain'), ('control', 'Control'), ('other', 'Other')], max_length=255, null=True)),
                ('date', models.DateField(blank=True, null=True)),
                ('comment', models.TextField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('gmnd', models.CharField(blank=True, help_text='Gemeinde', max_length=1000, null=True)),
                ('krs', models.CharField(blank=True, help_text='Kreis', max_length=1000, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Geometry',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('geom', django.contrib.gis.db.models.fields.MultiPolygonField(blank=True, null=True, srid=4326)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Parcel',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('gmrkng', models.CharField(blank=True, help_text='Gemarkung', max_length=1000, null=True)),
                ('flrstck_nnr', models.CharField(blank=True, help_text='Flurstücksnenner', max_length=1000, null=True)),
                ('flrstck_zhlr', models.CharField(blank=True, help_text='Flurstückszähler', max_length=1000, null=True)),
                ('flr', models.CharField(blank=True, help_text='Flur', max_length=1000, null=True)),
                ('updated_on', models.DateTimeField(auto_now_add=True)),
                ('district', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parcels', to='konova.district')),
                ('geometries', models.ManyToManyField(blank=True, related_name='parcels', to='konova.Geometry')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GeometryConflict',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('detected_on', models.DateTimeField(auto_now_add=True, null=True)),
                ('affected_geometry', models.ForeignKey(help_text='The geometry which came first', on_delete=django.db.models.deletion.CASCADE, related_name='conflicted_by_geometries', to='konova.geometry')),
                ('conflicting_geometry', models.ForeignKey(help_text='The geometry which came second', on_delete=django.db.models.deletion.CASCADE, related_name='conflicts_geometries', to='konova.geometry')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
