# Generated by Django 4.1 on 2024-04-29 09:18

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


class Migration(migrations.Migration):

    dependencies = [
        ('settings', '0013_operator_forward_commission_operator_percentage'),
        ('distributors', '0002_distributors_email_superdistributors_email'),
    ]

    operations = [
        migrations.CreateModel(
            name='Commission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('source', models.IntegerField(choices=[(1, 'Super Distributor'), (2, 'Distributor')], default=1)),
                ('receive_commission', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('forward_commission', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('percentage', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('is_active', models.BooleanField(default=True, editable=False)),
                ('created_on', models.DateField(default=datetime.datetime.now, editable=False)),
                ('distributor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='distributors.distributors')),
                ('operator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='operators', to='settings.operator')),
                ('super_distributor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='distributors.superdistributors')),
            ],
            options={
                'verbose_name': 'Commission',
                'verbose_name_plural': 'Commissions',
            },
        ),
    ]
