# Generated by Django 5.2 on 2026-02-05 23:35

from decimal import Decimal

from django.db import migrations


def seed_create_image_tool_cost(apps, schema_editor):
    ToolCreditCost = apps.get_model("api", "ToolCreditCost")
    if ToolCreditCost is None:
        return

    normalized_name = "create_image"
    if not ToolCreditCost.objects.filter(tool_name=normalized_name).exists():
        ToolCreditCost.objects.create(
            tool_name=normalized_name,
            credit_cost=Decimal("2"),
        )


class Migration(migrations.Migration):
    dependencies = [
        ("api", "0281_imagegenerationllmtier_imagegenerationmodelendpoint_and_more"),
    ]

    operations = [
        migrations.RunPython(seed_create_image_tool_cost, migrations.RunPython.noop),
    ]

