# Generated by Django 5.2.7 on 2025-10-07 16:45

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sku', models.CharField(max_length=100, unique=True)),
                ('category', models.CharField(max_length=100)),
                ('title', models.TextField()),
                ('description', models.TextField(blank=True)),
                ('attributes', models.JSONField(default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='CategoryAttributeRule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(max_length=100)),
                ('attribute_name', models.CharField(max_length=100)),
                ('is_mandatory', models.BooleanField(default=False)),
                ('valid_values', models.JSONField(blank=True, default=list)),
                ('data_type', models.CharField(default='string', max_length=50)),
            ],
            options={
                'unique_together': {('category', 'attribute_name')},
            },
        ),
        migrations.CreateModel(
            name='AttributeScore',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.FloatField()),
                ('max_score', models.FloatField(default=100.0)),
                ('details', models.JSONField(default=dict)),
                ('issues', models.JSONField(default=list)),
                ('suggestions', models.JSONField(default=list)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attribute_scores', to='core.product')),
            ],
        ),
    ]
