# Generated by Django 3.2.5 on 2021-07-22 07:06

import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="Location",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now, editable=False, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now, editable=False, verbose_name="modified"
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                ("state_code", models.CharField(blank=True, max_length=100, null=True)),
                ("country_code", models.CharField(max_length=2)),
                ("longitude", models.DecimalField(decimal_places=7, max_digits=10)),
                ("latitude", models.DecimalField(decimal_places=7, max_digits=9)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="UserTask",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now, editable=False, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now, editable=False, verbose_name="modified"
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[("new", "New"), ("pending", "Pending"), ("done", "Done")], default="new", max_length=20
                    ),
                ),
                ("title", models.CharField(max_length=500)),
                ("description", models.TextField(blank=True, null=True)),
                ("location", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="todo.location")),
                ("user", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
