# Generated by Django 5.0 on 2025-07-01 07:57

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


class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0023_alter_organization_company_code_and_more'),
        ('product', '0035_remove_quota_quota_balance'),
        ('warehouse', '0010_remove_inventorysaletransaction_quota_sale_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='InventoryQuotaSaleTransaction',
            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)),
                ('transaction_id', models.CharField(max_length=50, null=True)),
                ('weight', models.DecimalField(decimal_places=2, max_digits=12, null=True)),
                ('delivery_address', models.TextField(blank=True, null=True)),
                ('transaction_price', models.PositiveBigIntegerField(default=0)),
                ('description', models.TextField(blank=True, null=True)),
                ('herd_owners_number', models.PositiveBigIntegerField(default=0)),
                ('transactions_number', models.PositiveBigIntegerField(default=0)),
                ('sale_status', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=0)),
                ('buyer_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='buyer_sale_transactions', to=settings.AUTH_USER_MODEL)),
                ('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)),
                ('inventory_entry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inventory_sales', to='warehouse.inventoryentry')),
                ('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)),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sale_transactions', to='product.product')),
                ('quota_distribution', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inventory_sales', to='product.quotadistribution')),
                ('seller_organization', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inventory_sales', to='authentication.organization')),
                ('seller_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='seller_sale_transactions', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
