# Generated by Django 5.0 on 2026-01-20 07:31

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


class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0060_organization_ownership_code'),
        ('tag', '0036_tagdistribution_assigner_org_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='tagdistribution',
            name='dist_identity',
            field=models.CharField(default='0', max_length=20, null=True, unique=True),
        ),
        migrations.AddField(
            model_name='tagdistribution',
            name='is_closed',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='tagbatch',
            name='tag',
            field=models.ManyToManyField(related_name='batches', to='tag.tag'),
        ),
        migrations.CreateModel(
            name='TagDistributionBatch',
            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)),
                ('dist_batch_identity', models.CharField(default='0', max_length=20, null=True, unique=True)),
                ('total_tag_count', models.IntegerField(default=0)),
                ('is_closed', models.BooleanField(default=False)),
                ('assigned_org', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='to_tag_distribution_batch', to='authentication.organization')),
                ('assigner_org', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='from_tag_distribution_batch', to='authentication.organization')),
                ('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)),
                ('distributions', models.ManyToManyField(related_name='tag_distribution_batch', to='tag.tagdistribution')),
                ('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)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
