# Generated by Django 5.2.9 on 2026-02-08 12:14

import django.contrib.postgres.indexes
import django.core.validators
from decimal import Decimal
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0027_add_attribute_models'),
        ('vat', '0006_rename_vat_created_at_idx_vat_created_at_ix_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='historicalproduct',
            name='points',
            field=models.PositiveIntegerField(default=0, help_text='Fixed bonus points awarded on purchase', verbose_name='Bonus Points'),
        ),
        migrations.AddField(
            model_name='historicalproduct',
            name='points_coefficient',
            field=models.DecimalField(decimal_places=2, default=Decimal('1.0'), help_text='Multiplier for loyalty points calculation (0 = no calculated points)', max_digits=5, validators=[django.core.validators.MinValueValidator(Decimal('0.0'))], verbose_name='Points Coefficient'),
        ),
        migrations.AddField(
            model_name='product',
            name='points',
            field=models.PositiveIntegerField(default=0, help_text='Fixed bonus points awarded on purchase', verbose_name='Bonus Points'),
        ),
        migrations.AddField(
            model_name='product',
            name='points_coefficient',
            field=models.DecimalField(decimal_places=2, default=Decimal('1.0'), help_text='Multiplier for loyalty points calculation (0 = no calculated points)', max_digits=5, validators=[django.core.validators.MinValueValidator(Decimal('0.0'))], verbose_name='Points Coefficient'),
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['points_coefficient'], name='product_points_coeff_ix'),
        ),
    ]
