# Generated by Django 4.1.7 on 2023-04-17 22:11

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", "0038_alter_objectwithgenres_tag"),
    ]

    operations = [
        migrations.CreateModel(
            name="BoardGamePublisher",
            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"
                    ),
                ),
                ("name", models.CharField(max_length=255)),
                (
                    "uuid",
                    models.UUIDField(
                        blank=True,
                        default=uuid.uuid4,
                        editable=False,
                        null=True,
                    ),
                ),
                (
                    "logo",
                    models.ImageField(
                        blank=True,
                        null=True,
                        upload_to="games/platform-logos/",
                    ),
                ),
                ("igdb_id", models.IntegerField(blank=True, null=True)),
            ],
            options={
                "get_latest_by": "modified",
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="BoardGame",
            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"
                    ),
                ),
                (
                    "run_time_seconds",
                    models.IntegerField(blank=True, null=True),
                ),
                (
                    "run_time_ticks",
                    models.PositiveBigIntegerField(blank=True, null=True),
                ),
                ("title", models.CharField(max_length=255)),
                (
                    "uuid",
                    models.UUIDField(
                        blank=True,
                        default=uuid.uuid4,
                        editable=False,
                        null=True,
                    ),
                ),
                (
                    "cover",
                    models.ImageField(
                        blank=True, null=True, upload_to="boardgames/covers/"
                    ),
                ),
                (
                    "layout_image",
                    models.ImageField(
                        blank=True, null=True, upload_to="boardgames/layouts/"
                    ),
                ),
                ("summary", models.TextField(blank=True, null=True)),
                ("rating", models.FloatField(blank=True, null=True)),
                (
                    "max_players",
                    models.PositiveSmallIntegerField(blank=True, null=True),
                ),
                (
                    "min_players",
                    models.PositiveSmallIntegerField(blank=True, null=True),
                ),
                ("published_date", models.DateField(blank=True, null=True)),
                (
                    "recommened_age",
                    models.PositiveSmallIntegerField(blank=True, null=True),
                ),
                (
                    "seconds_to_play",
                    models.IntegerField(blank=True, null=True),
                ),
                (
                    "bggeek_id",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                (
                    "genre",
                    taggit.managers.TaggableManager(
                        help_text="A comma-separated list of tags.",
                        through="scrobbles.ObjectWithGenres",
                        to="scrobbles.Genre",
                        verbose_name="Tags",
                    ),
                ),
                (
                    "publisher",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        to="boardgames.boardgamepublisher",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
