# Generated by Django 3.2.13 on 2025-03-02 14:58

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


class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0062_auto_20250302_1458'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('panel', '0463_auto_20250302_1458'),
        ('LiveStock', '0004_cooperative_union'),
    ]

    operations = [
        migrations.CreateModel(
            name='LiveStockProduct',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=200, null=True)),
                ('image', models.CharField(max_length=500, null=True)),
                ('unit', models.CharField(max_length=200, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='livestockproduct_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='livestockproduct_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Rancher',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=200, null=True)),
                ('mobile', models.CharField(max_length=200, null=True)),
                ('type', models.CharField(max_length=200, null=True)),
                ('account', models.CharField(max_length=200, null=True)),
                ('national_id', models.CharField(max_length=100, null=True)),
                ('unit_id', models.CharField(max_length=100, null=True)),
                ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_address', to='authentication.systemaddress')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_user', to='authentication.systemuserprofile')),
                ('user_bank_info', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_bank_info', to='authentication.bankcard')),
                ('wallet', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_wallet', to='panel.wallet')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='LiveStockRolseProduct',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=200, null=True)),
                ('total_weight', models.BigIntegerField(default=0)),
                ('total_allocated_weight', models.BigIntegerField(default=0)),
                ('total_remain_weight', models.CharField(max_length=500, null=True)),
                ('cooperative', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cooperative_product', to='LiveStock.cooperative')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='livestockrolseproduct_createdby', to=settings.AUTH_USER_MODEL)),
                ('jahad', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jahad_product', to='LiveStock.livestockproduct')),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='livestockrolseproduct_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('parent_product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='parents_product', to='LiveStock.livestockproduct')),
                ('rancher', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_product', to='LiveStock.rancher')),
                ('union', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='union_product', to='LiveStock.union')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='LiveStockAllocations',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('state', models.CharField(default='pending', max_length=200)),
                ('weight', models.BigIntegerField(default=0)),
                ('real_weight', models.BigIntegerField(default=0)),
                ('cooperative', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cooperative_allocation', to='LiveStock.cooperative')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='livestockallocations_createdby', to=settings.AUTH_USER_MODEL)),
                ('jahad', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jahad_allocation', to='LiveStock.livestockproduct')),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='livestockallocations_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_allocation', to='LiveStock.livestockrolseproduct')),
                ('rancher', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rancher_allocation', to='LiveStock.cooperative')),
                ('union', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='union_allocation', to='LiveStock.union')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
