# Generated by Django 5.0.6 on 2026-10-20 11:37

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CouponVote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coupon_id', models.PositiveIntegerField(db_index=True)),
                ('store_slug', models.SlugField(max_length=255)),
                ('worked', models.BooleanField()),
                ('voter_hash', models.CharField(max_length=64)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'coupon vote',
                'verbose_name_plural': 'coupon votes',
            },
        ),
        migrations.CreateModel(
            name='StoreComment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('store_slug', models.SlugField(max_length=255)),
                ('name', models.CharField(max_length=60)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('body', models.TextField(max_length=1000)),
                ('approved', models.BooleanField(db_index=True, default=False)),
                ('reply', models.TextField(blank=True, help_text="Optional public reply, shown under the comment as 'SuperCosts Team'.")),
                ('ip_hash', models.CharField(blank=True, editable=False, max_length=64)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
            ],
            options={
                'verbose_name': 'store comment',
                'verbose_name_plural': 'store comments',
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddConstraint(
            model_name='couponvote',
            constraint=models.UniqueConstraint(fields=('coupon_id', 'voter_hash'), name='one_vote_per_visitor_per_coupon'),
        ),
    ]
