# Generated by Django 5.0.3 on 2024-03-22 05:46

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


class Migration(migrations.Migration):

    dependencies = [
        (
            "retailers",
            "0003_alter_transaction_operator_alter_recharge_operator_and_more",
        ),
        ("settings", "0002_mrobotics"),
    ]

    operations = [
        migrations.RenameField(
            model_name="recharge",
            old_name="amount",
            new_name="balance",
        ),
        migrations.RenameField(
            model_name="transaction",
            old_name="amount",
            new_name="balance",
        ),
        migrations.RemoveField(
            model_name="recharge",
            name="name",
        ),
        migrations.RemoveField(
            model_name="transaction",
            name="name",
        ),
        migrations.AddField(
            model_name="recharge",
            name="mrobotics",
            field=models.ForeignKey(
                default="",
                limit_choices_to={"is_active": True},
                on_delete=django.db.models.deletion.CASCADE,
                to="settings.mrobotics",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="recharge",
            name="operator_no",
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
        migrations.AddField(
            model_name="recharge",
            name="order_id",
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
        migrations.AddField(
            model_name="recharge",
            name="recharge_id",
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
        migrations.AddField(
            model_name="transaction",
            name="order_id",
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
        migrations.AlterField(
            model_name="recharge",
            name="operator",
            field=models.ForeignKey(
                limit_choices_to={"is_active": True},
                on_delete=django.db.models.deletion.CASCADE,
                to="settings.operator",
            ),
        ),
        migrations.AlterField(
            model_name="recharge",
            name="retailer",
            field=models.ForeignKey(
                limit_choices_to={"is_active": True},
                on_delete=django.db.models.deletion.CASCADE,
                to="retailers.retailer",
            ),
        ),
        migrations.AlterField(
            model_name="transaction",
            name="operator",
            field=models.ForeignKey(
                limit_choices_to={"is_active": True},
                on_delete=django.db.models.deletion.CASCADE,
                to="settings.operator",
            ),
        ),
        migrations.AlterField(
            model_name="transaction",
            name="retailer",
            field=models.ForeignKey(
                limit_choices_to={"is_active": True},
                on_delete=django.db.models.deletion.CASCADE,
                to="retailers.retailer",
            ),
        ),
        migrations.AlterField(
            model_name="transaction",
            name="source",
            field=models.IntegerField(
                choices=[(1, "Wallet"), (2, "Recharge")], default=1
            ),
        ),
        migrations.AlterField(
            model_name="wallet",
            name="retailer",
            field=models.ForeignKey(
                limit_choices_to={"is_active": True},
                on_delete=django.db.models.deletion.CASCADE,
                to="retailers.retailer",
            ),
        ),
    ]
