# Generated by Django 5.2.7 on 2025-10-09 05:56

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_attributescore_ai_suggestions_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProductContentRule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(blank=True, help_text='Category or NULL for a global rule.', max_length=100, null=True)),
                ('field_name', models.CharField(help_text="e.g., 'title', 'description', 'seo_title'", max_length=100)),
                ('is_mandatory', models.BooleanField(default=True)),
                ('min_length', models.IntegerField(blank=True, help_text='Minimum character length.', null=True)),
                ('max_length', models.IntegerField(blank=True, help_text='Maximum character length.', null=True)),
                ('min_word_count', models.IntegerField(blank=True, help_text='Minimum word count.', null=True)),
                ('max_word_count', models.IntegerField(blank=True, help_text='Maximum word count.', null=True)),
                ('must_contain_keywords', models.JSONField(blank=True, default=list, help_text='List of keywords (case-insensitive) that must be present.')),
                ('validation_regex', models.CharField(blank=True, help_text='A regex to validate the field content.', max_length=500)),
                ('description', models.TextField(blank=True)),
            ],
            options={
                'indexes': [models.Index(fields=['field_name'], name='core_produc_field_n_a71c60_idx'), models.Index(fields=['category', 'field_name'], name='core_produc_categor_4c8c2e_idx')],
                'unique_together': {('category', 'field_name')},
            },
        ),
    ]
