# Generated by Django 4.1.8 on 2023-04-06 14:14

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
    ]

    operations = [
        migrations.CreateModel(
            name="TagGroup",
            fields=[
                (
                    "id",
                    models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
                ),
                ("managed", models.BooleanField(default=False)),
                ("title", models.CharField(max_length=255, unique=True)),
            ],
            options={
                "verbose_name": "Tag Group",
                "verbose_name_plural": "Tag Groups",
            },
        ),
        migrations.CreateModel(
            name="Tag",
            fields=[
                (
                    "id",
                    models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
                ),
                ("computed_str", models.CharField(blank=True, max_length=512, null=True, verbose_name="Name")),
                ("managed", models.BooleanField(default=False)),
                ("title", models.CharField(max_length=255)),
                ("slug", models.CharField(blank=True, max_length=255, null=True)),
                ("color", wbcore.contrib.color.fields.ColorField(default="#D3D3D3")),
                ("description", models.TextField(blank=True, default="")),
                (
                    "content_type",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="associated_tags",
                        to="contenttypes.contenttype",
                    ),
                ),
                ("groups", models.ManyToManyField(blank=True, to="tags.taggroup")),
            ],
            options={
                "verbose_name": "Tag",
                "verbose_name_plural": "Tags",
                "unique_together": {("slug", "content_type")},
            },
        ),
    ]
