# Generated by Django 5.0 on 2025-09-24 11:56

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


class Migration(migrations.Migration):

    dependencies = [
        ('herd', '0018_rancher_dhi_state'),
        ('livestock', '0015_livestocktype_en_name_alter_livestocktype_name'),
        ('product', '0077_quota_pos_sale_type'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='QuotaUsage',
            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)),
                ('count', models.PositiveIntegerField()),
                ('base_quota_used', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('incentive_quota_used', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('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)),
                ('incentive_plan', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.incentiveplan')),
                ('livestock_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='usages', to='livestock.livestocktype')),
                ('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)),
                ('rancher', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='usages', to='herd.rancher')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
