# Generated by Django 5.2.4 on 2025-08-24 16:22

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("core", "0001_initial"),
        ("ocpp", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="charger",
            name="reference",
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="core.reference",
            ),
        ),
        migrations.AddField(
            model_name="charger",
            name="location",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="chargers",
                to="ocpp.location",
            ),
        ),
        migrations.AddField(
            model_name="metervalue",
            name="charger",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="meter_values",
                to="ocpp.charger",
            ),
        ),
        migrations.AddField(
            model_name="transaction",
            name="account",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="transactions",
                to="core.energyaccount",
            ),
        ),
        migrations.AddField(
            model_name="transaction",
            name="charger",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="transactions",
                to="ocpp.charger",
            ),
        ),
        migrations.AddField(
            model_name="metervalue",
            name="transaction",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="meter_values",
                to="ocpp.transaction",
            ),
        ),
    ]
