# Generated by Django 3.2.13 on 2024-05-13 16:07

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('authentication', '0029_auto_20240513_1607'),
        ('panel', '0116_auto_20240508_1355'),
    ]

    operations = [
        migrations.AddField(
            model_name='poultry',
            name='has_chain_company',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='poultryhatching',
            name='chain_killed_quantity',
            field=models.FloatField(default=0),
        ),
        migrations.AddField(
            model_name='poultryhatching',
            name='chain_killed_weight',
            field=models.FloatField(default=0),
        ),
        migrations.AddField(
            model_name='poultryhatching',
            name='has_chain_company',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='functionexecutor',
            name='compare_time',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 57, 417394)),
        ),
        migrations.AlterField(
            model_name='operatorlasttimeenter',
            name='assignment_last_time_check',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 56, 761389)),
        ),
        migrations.AlterField(
            model_name='operatorlasttimeenter',
            name='city_operator_last_time_check',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 56, 761389)),
        ),
        migrations.AlterField(
            model_name='operatorlasttimeenter',
            name='kill_house_last_time_check',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 56, 761389)),
        ),
        migrations.AlterField(
            model_name='operatorlasttimeenter',
            name='province_operator_last_time_check',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 56, 761389)),
        ),
        migrations.AlterField(
            model_name='poultry',
            name='date_of_register',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 56, 767388)),
        ),
        migrations.AlterField(
            model_name='poultry',
            name='hatching_date',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 56, 767388)),
        ),
        migrations.AlterField(
            model_name='poultry',
            name='last_party_date',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 56, 767388)),
        ),
        migrations.AlterField(
            model_name='totalpoultryrequestquantity',
            name='date',
            field=models.DateTimeField(default=datetime.datetime(2024, 5, 13, 16, 6, 57, 145393)),
        ),
        migrations.CreateModel(
            name='ChainCompany',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, 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)),
                ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chain_company_address', to='authentication.systemaddress')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chaincompany_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chaincompany_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chain_company_user', to='authentication.systemuserprofile')),
                ('user_bank_info', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chain_company_bank_info', to='authentication.bankcard')),
                ('wallet', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chain_company_wallet', to='panel.wallet')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ChainAllocation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('date', models.DateTimeField(null=True)),
                ('state', models.CharField(default='pending', max_length=50)),
                ('quantity', models.BigIntegerField(default=0)),
                ('weight', models.FloatField(default=0)),
                ('chain_company', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chain_company_allocation', to='panel.chaincompany')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chainallocation_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chainallocation_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('poultry_hatching', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='poultry_hatching_chain_allocation', to='panel.poultryhatching')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='poultryhatching',
            name='chain_company',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='poultry_hatching_chain_company', to='panel.chaincompany'),
        ),
    ]
