# Generated by hand for rewards bonus metrics models

import uuid
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '10007_user_address_fields'),
        ('rewards', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='FranchiseMonthlyIncentive',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('is_active', models.BooleanField(db_index=True, default=True)),
                ('period_month', models.DateField(db_index=True, help_text='Use first day of month as canonical value')),
                ('amount', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('notes', models.TextField(blank=True, default='')),
                ('user', models.ForeignKey(db_index=True, on_delete=django.db.models.deletion.CASCADE, related_name='franchise_monthly_incentives', to='accounts.user')),
            ],
            options={
                'indexes': [models.Index(fields=['user', 'period_month'], name='rewards_fra_user_id_8d8b53_idx'), models.Index(fields=['period_month', 'is_active'], name='rewards_fra_period__910214_idx')],
                'unique_together': {('user', 'period_month')},
            },
        ),
        migrations.CreateModel(
            name='UserBonanzaCounter',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('is_active', models.BooleanField(db_index=True, default=True)),
                ('category', models.CharField(choices=[('LUCKY_DIP_BONANZA', 'Lucky Dip Bonanza'), ('PRODUCTS_BONANZA', 'Products Bonanza'), ('DOMESTIC_TRAVEL_BONANZA', 'Domestic Travel Bonanza'), ('INTERNATIONAL_TRAVEL_BONANZA', 'International Travel Bonanza'), ('TWO_WHEELER_BONANZA', 'Two Wheeler Bonanza'), ('ALKALINE_WATER_DEVICE_BONANZA', 'Alkaline Water Device Bonanza'), ('GOLD_BONANZA', 'Gold Bonanza'), ('CAR_FUND_BONANZA', 'Car Fund Bonanza')], db_index=True, max_length=48)),
                ('quantity', models.PositiveIntegerField(default=0)),
                ('amount', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('notes', models.TextField(blank=True, default='')),
                ('user', models.ForeignKey(db_index=True, on_delete=django.db.models.deletion.CASCADE, related_name='bonanza_counters', to='accounts.user')),
            ],
            options={
                'indexes': [models.Index(fields=['user', 'category'], name='rewards_use_user_id_fed8a6_idx'), models.Index(fields=['category', 'is_active'], name='rewards_use_categor_477d32_idx')],
                'unique_together': {('user', 'category')},
            },
        ),
    ]
