# Generated by Django 4.2.19 on 2025-05-11 03:21

from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import taggit.managers
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("scrobbles", "0068_scrobble_paper_alter_scrobble_media_type"),
    ]

    operations = [
        migrations.CreateModel(
            name="PuzzleManufacturer",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                (
                    "uuid",
                    models.UUIDField(
                        blank=True,
                        default=uuid.uuid4,
                        editable=False,
                        null=True,
                    ),
                ),
                ("name", models.CharField(max_length=255)),
                (
                    "ipdb_id",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                ("description", models.TextField(blank=True, null=True)),
            ],
            options={
                "get_latest_by": "modified",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Puzzle",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                (
                    "uuid",
                    models.UUIDField(
                        blank=True,
                        default=uuid.uuid4,
                        editable=False,
                        null=True,
                    ),
                ),
                (
                    "title",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                ("run_time_seconds", models.IntegerField(default=900)),
                (
                    "run_time_ticks",
                    models.PositiveBigIntegerField(blank=True, null=True),
                ),
                ("description", models.TextField(blank=True, null=True)),
                (
                    "orientation",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "dimensions_in_inches",
                    models.CharField(blank=True, max_length=10, null=True),
                ),
                ("publish_year", models.IntegerField(blank=True, null=True)),
                (
                    "material",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "cut_style",
                    models.CharField(blank=True, max_length=100, null=True),
                ),
                ("pieces_count", models.IntegerField(blank=True, null=True)),
                (
                    "igdb_id",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                (
                    "barcode",
                    models.CharField(blank=True, max_length=13, null=True),
                ),
                (
                    "igdb_image",
                    models.ImageField(
                        blank=True, null=True, upload_to="puzzles/igdb/"
                    ),
                ),
                (
                    "genre",
                    taggit.managers.TaggableManager(
                        blank=True,
                        help_text="A comma-separated list of tags.",
                        through="scrobbles.ObjectWithGenres",
                        to="scrobbles.Genre",
                        verbose_name="Tags",
                    ),
                ),
                (
                    "manufacturer",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        to="puzzles.puzzlemanufacturer",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
