# Generated by Django 3.2.16 on 2024-01-05 10:44

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
from django.apps import apps
import uuid


def create_tags(app, schema_editor):

    TicketTag = apps.get_model("home", "TicketTag")

    data = [
        {"title": "Network", "colour": "#0000FF"},
        {"title": "Software", "colour": "#FFA500"},
        {"title": "Hardware", "colour": "#808080"},
        {"title": "Question", "colour": "#FFFF00"},
        {"title": "Requires Help", "colour": "#00FF00"},
        {"title": "Issue", "colour": "#FF0000"}
    ]

    for item in data:
        priority = TicketTag.objects.create(title=item["title"], colour=item["colour"])


class Migration(migrations.Migration):

    dependencies = [
        ("home", "default_priorities"),
    ]

    operations = [
       migrations.RunPython(create_tags)
    ]
