# Generated by Django 5.0.1 on 2024-01-28 03:32

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Country",
            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)),
                ("status", models.BooleanField(default=True, verbose_name="status")),
                (
                    "spanish_name",
                    models.CharField(
                        help_text="Country spanish name",
                        max_length=250,
                        verbose_name="Country spanish name",
                    ),
                ),
                (
                    "english_name",
                    models.CharField(
                        help_text="Country english name",
                        max_length=250,
                        verbose_name="Country english name",
                    ),
                ),
                (
                    "nom",
                    models.CharField(
                        help_text="Country nom",
                        max_length=250,
                        verbose_name="Country nom",
                    ),
                ),
                (
                    "iso2",
                    models.CharField(
                        help_text="Country iso2",
                        max_length=250,
                        verbose_name="Country iso2",
                    ),
                ),
                (
                    "iso3",
                    models.CharField(
                        help_text="Country iso3",
                        max_length=250,
                        verbose_name="Country iso3",
                    ),
                ),
                (
                    "phone_code",
                    models.CharField(
                        help_text="Country phone code",
                        max_length=250,
                        verbose_name="Country phone code",
                    ),
                ),
            ],
            options={
                "verbose_name": "Country",
                "verbose_name_plural": "Countries",
            },
        ),
        migrations.CreateModel(
            name="Region",
            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)),
                ("status", models.BooleanField(default=True, verbose_name="status")),
                (
                    "name",
                    models.CharField(
                        help_text="Region name",
                        max_length=100,
                        verbose_name="Region name",
                    ),
                ),
                (
                    "country",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="region_country",
                        to="artd_location.country",
                    ),
                ),
            ],
            options={
                "verbose_name": "Region",
                "verbose_name_plural": "Regions",
            },
        ),
        migrations.CreateModel(
            name="City",
            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)),
                ("status", models.BooleanField(default=True, verbose_name="status")),
                (
                    "name",
                    models.CharField(
                        help_text="City name", max_length=100, verbose_name="City name"
                    ),
                ),
                (
                    "name_in_capital_letters",
                    models.CharField(
                        help_text="Name in capital letters",
                        max_length=100,
                        verbose_name="Name in capital letters",
                    ),
                ),
                (
                    "code",
                    models.CharField(
                        help_text="City code", max_length=10, verbose_name="City code"
                    ),
                ),
                (
                    "region",
                    models.ForeignKey(
                        help_text="Region",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="city_region",
                        to="artd_location.region",
                    ),
                ),
            ],
            options={
                "verbose_name": "City",
                "verbose_name_plural": "Cities",
            },
        ),
    ]
