# Generated by Django 3.2.5 on 2021-07-27 08:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('locations', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Property',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('parcel', models.CharField(max_length=3)),
                ('block', models.CharField(max_length=5)),
                ('is_queens_chain', models.BooleanField(default=False, verbose_name="queen's chain")),
                ('community', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='locations.community')),
                ('created_by', models.ForeignKey(blank=True, default=1, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='property_created_by', to=settings.AUTH_USER_MODEL)),
                ('district', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='locations.district')),
                ('quarter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='locations.quarter')),
                ('updated_by', models.ForeignKey(blank=True, default=1, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='property_updated_by', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SurveyPlan',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('survey_plan_no', models.CharField(max_length=100)),
                ('survey_date', models.DateField()),
                ('created_by', models.ForeignKey(blank=True, default=1, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='surveyplan_created_by', to=settings.AUTH_USER_MODEL)),
                ('plot', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='properties', to='properties.property')),
                ('updated_by', models.ForeignKey(blank=True, default=1, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='surveyplan_updated_by', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
