# Generated by Django 4.0.5 on 2022-11-23 05:58

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

import metering_billing.utils.utils


class Migration(migrations.Migration):
    dependencies = [
        ("metering_billing", "0082_customer_default_currency_and_more"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="customerbalanceadjustment",
            options={"ordering": ["-created"]},
        ),
        migrations.AddField(
            model_name="customerbalanceadjustment",
            name="adjustment_id",
            field=models.CharField(
                default=metering_billing.utils.utils.customer_balance_adjustment_uuid,
                max_length=100,
            ),
        ),
        migrations.AddField(
            model_name="customerbalanceadjustment",
            name="organization",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="metering_billing.organization",
            ),
        ),
        migrations.AddField(
            model_name="customerbalanceadjustment",
            name="parent_adjustment",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="drawdowns",
                to="metering_billing.customerbalanceadjustment",
            ),
        ),
        migrations.AddField(
            model_name="customerbalanceadjustment",
            name="status",
            field=models.CharField(
                choices=[("active", "Active"), ("inactive", "Inactive")],
                default="active",
                max_length=20,
            ),
        ),
        migrations.AlterField(
            model_name="pricingunit",
            name="code",
            field=models.CharField(max_length=10),
        ),
        migrations.AlterUniqueTogether(
            name="pricingunit",
            unique_together={("organization", "code")},
        ),
    ]
