# Generated by Django 3.1.5 on 2021-02-13 05:56

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city_name', models.CharField(max_length=250, unique=True)),
                ('is_popular', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('slug', models.CharField(max_length=250)),
                ('meta_title', models.CharField(blank=True, max_length=250, null=True)),
                ('meta_description', models.TextField(blank=True, max_length=10000, null=True)),
                ('meta_keyword', models.CharField(blank=True, max_length=250, null=True)),
                ('city_image', models.FileField(blank=True, null=True, upload_to=location.models.City.folder_path)),
                ('alt', models.CharField(blank=True, max_length=250, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country_name', models.CharField(max_length=250, unique=True)),
                ('country_code', models.CharField(blank=True, max_length=250, null=True)),
                ('country_currency', models.CharField(blank=True, max_length=250, null=True)),
                ('country_phone_code', models.CharField(blank=True, max_length=250, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('state_name', models.CharField(max_length=250, unique=True)),
                ('is_popular', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('slug', models.CharField(max_length=250)),
                ('meta_title', models.CharField(blank=True, max_length=250, null=True)),
                ('meta_description', models.TextField(blank=True, max_length=10000, null=True)),
                ('meta_keyword', models.CharField(blank=True, max_length=250, null=True)),
                ('state_image', models.FileField(blank=True, null=True, upload_to=location.models.State.folder_path)),
                ('alt', models.CharField(blank=True, max_length=250, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_country_name', to='location.country')),
            ],
        ),
        migrations.CreateModel(
            name='Pincode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pincode', models.IntegerField(unique=True)),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pincode_city_name', to='location.city')),
                ('state', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pincode_state_name', to='location.state')),
            ],
        ),
        migrations.AddField(
            model_name='city',
            name='state',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='city_state_name', to='location.state'),
        ),
    ]
