# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-18 10:56
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AgreementCadWork',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('address', models.CharField(max_length=4000)),
            ],
            options={
                'verbose_name': 'Номер и дата заключения договора на выполнение кадастровых работ',
            },
        ),
        migrations.CreateModel(
            name='Draft_Mp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('guid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('version', models.CharField(default='06', max_length=255)),
                ('name_soft', models.CharField(default='itt', max_length=255)),
            ],
            options={
                'verbose_name': 'Проект',
            },
        ),
        migrations.CreateModel(
            name='Draft_TypeMp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Образование', max_length=255)),
            ],
            options={
                'verbose_name': 'Тип межевого плана',
            },
        ),
        migrations.CreateModel(
            name='GeneralWorks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.CharField(max_length=4000)),
                ('pupose', models.CharField(blank=True, max_length=4000, null=True)),
                ('date_cadastral', models.DateField()),
                ('mp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mpdraft.Draft_Mp')),
            ],
            options={
                'verbose_name': 'Общие сведения кадастровых  работ',
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('adress', models.CharField(max_length=4000)),
            ],
            options={
                'verbose_name': 'Организаиця',
            },
        ),
        migrations.CreateModel(
            name='PersonQualified',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('family_name', models.CharField(max_length=255)),
                ('first_name', models.CharField(max_length=255)),
                ('poatronymic', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name': 'ФИО',
            },
        ),
        migrations.CreateModel(
            name='Contractor',
            fields=[
                ('personqualified_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mpdraft.PersonQualified')),
                ('snils', models.CharField(max_length=14)),
                ('engineerregistry_number', models.CharField(max_length=50)),
                ('telefon', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=4000)),
                ('email', models.CharField(max_length=4000)),
                ('draft_selfregulatory_organization', models.CharField(max_length=255)),
                ('draft_agreement_cadwork', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mpdraft.AgreementCadWork')),
                ('organization', models.ForeignKey(default=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mpdraft.Organization')),
            ],
            options={
                'verbose_name': 'Исполнитель',
            },
            bases=('mpdraft.personqualified',),
        ),
        migrations.AddField(
            model_name='draft_mp',
            name='method',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='type_mp', to='mpdraft.Draft_TypeMp'),
        ),
        migrations.AddField(
            model_name='generalworks',
            name='contractor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mpdraft.Contractor'),
        ),
    ]
