# Generated by Django 5.1.4 on 2024-12-27 13:45

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Author",
            fields=[
                ("order", models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order")),
                ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ("first_name", models.CharField(max_length=100)),
                ("last_name", models.CharField(max_length=100)),
                ("pseudonym", models.CharField(blank=True, max_length=100, null=True)),
                ("created_dt", models.DateTimeField(auto_now_add=True)),
                ("modified_dt", models.DateTimeField(auto_now=True)),
            ],
            options={
                "ordering": ("order",),
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Bar",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name="Foo",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name="Baz",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=100)),
                ("bar", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.bar")),
            ],
        ),
        migrations.CreateModel(
            name="Book",
            fields=[
                ("order", models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order")),
                ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ("title", models.CharField(max_length=100)),
                ("price", models.DecimalField(decimal_places=2, max_digits=10)),
                ("created_dt", models.DateTimeField(auto_now_add=True)),
                ("modified_dt", models.DateTimeField(auto_now=True)),
                ("author", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.author")),
            ],
            options={
                "ordering": ("order",),
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="bar",
            name="foo",
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="app.foo"),
        ),
    ]
