# Generated by Django 3.2.7 on 2022-06-26 15:43

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0010_alter_config_service'),
    ]

    operations = [
        migrations.CreateModel(
            name='Earning',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deletedViaCascade', models.BooleanField(default=False, editable=False)),
                ('uid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('deleted', models.BooleanField(default=False)),
                ('deletedById', models.UUIDField(blank=True, null=True)),
                ('deletedAt', models.DateTimeField(blank=True, db_column='deletedAt', null=True)),
                ('createdAt', models.DateTimeField(auto_now_add=True, db_column='createdAt')),
                ('updatedAt', models.DateTimeField(auto_now=True, db_column='updatedAt')),
                ('transactionRef', models.CharField(blank=True, db_column='transactionRef', max_length=255, null=True)),
                ('amount', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('balanceBefore', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('balanceAfter', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('createdBy', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'Earnings',
            },
        ),
        migrations.RemoveField(
            model_name='transactionlog',
            name='email',
        ),
        migrations.RemoveField(
            model_name='transactionlog',
            name='name',
        ),
        migrations.RemoveField(
            model_name='transactionlog',
            name='recipient',
        ),
        migrations.RemoveField(
            model_name='transactionlog',
            name='service',
        ),
        migrations.RemoveField(
            model_name='transactionlog',
            name='serviceDescription',
        ),
        migrations.AddField(
            model_name='transactionlog',
            name='transactionType',
            field=models.CharField(choices=[('wallet-topup', 'wallet-topup'), ('wallet-withdrawal', 'wallet-withdrawal'), ('kyc-verification', 'kyc-verification'), ('meter-vend', 'meter-vend'), ('buy-meter', 'buy-meter'), ('service-order-commitment', 'service-order-commitment'), ('service-order-complete', 'service-order-complete'), ('others', 'others')], default='', max_length=30),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='transactionlog',
            name='workOrder',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='app.workorder'),
        ),
        migrations.DeleteModel(
            name='Payment',
        ),
        migrations.AddField(
            model_name='earning',
            name='transactionLog',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='app.transactionlog'),
        ),
        migrations.AddField(
            model_name='earning',
            name='workOrder',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='app.workorder'),
        ),
    ]
