# Generated by Django 5.2.9 on 2026-01-03 17:52

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


class Migration(migrations.Migration):

    dependencies = [
        ("ocpp", "0008_forwarder_defaults_and_exports"),
    ]

    operations = [
        migrations.CreateModel(
            name="ClearedChargingLimitEvent",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_user_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                (
                    "ocpp_message_id",
                    models.CharField(blank=True, default="", max_length=120),
                ),
                ("evse_id", models.PositiveIntegerField(blank=True, null=True)),
                (
                    "charging_limit_source",
                    models.CharField(blank=True, default="", max_length=120),
                ),
                ("raw_payload", models.JSONField(blank=True, default=dict)),
                ("cleared_at", models.DateTimeField(auto_now_add=True)),
                (
                    "charger",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="cleared_charging_limits",
                        to="ocpp.charger",
                    ),
                ),
            ],
            options={
                "verbose_name": "Cleared Charging Limit Event",
                "verbose_name_plural": "Cleared Charging Limit Events",
                "ordering": ["-cleared_at", "-pk"],
            },
        ),
    ]
