# Generated by Django 5.0 on 2025-06-11 12:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('authorization', '0017_alter_permissions_name'),
        ('product', '0025_broker_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='QuotaDistribution',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('creator_info', models.CharField(max_length=100, null=True)),
                ('modifier_info', models.CharField(max_length=100, null=True)),
                ('trash', models.BooleanField(default=False)),
                ('description', models.TextField(max_length=1000, null=True)),
                ('distribution_id', models.CharField(max_length=20, null=True)),
                ('weight', models.PositiveBigIntegerField(default=0)),
                ('warehouse_entry', models.PositiveBigIntegerField(default=0)),
                ('warehouse_balance', models.PositiveBigIntegerField(default=0)),
                ('been_sold', models.PositiveBigIntegerField(default=0)),
                ('assigned_organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='distributions', to='authorization.userrelations')),
                ('assigner_organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='distributions_assigner', to='authorization.userrelations')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_createddby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('quota', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='distributions_assigned', to='product.quota')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
