# Generated by Django 5.2.14 on 2026-08-13 21:28

import django.db.models.deletion
import simple_history.models
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False, verbose_name='Eliminado')),
                ('created_at', models.DateField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('updated_at', models.DateField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('deleted_at', models.DateField(blank=True, null=True, verbose_name='Fecha de Eliminación')),
                ('category_name', models.CharField(max_length=150, unique=True, verbose_name='Nombre de Categoría')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Descripción')),
                ('category_image', models.ImageField(blank=True, null=True, upload_to='categories/', verbose_name='Imagen de Categoría')),
            ],
            options={
                'verbose_name': 'Categoría',
                'verbose_name_plural': 'Categorías',
                'ordering': ['category_name'],
            },
        ),
        migrations.CreateModel(
            name='HistoricalCategory',
            fields=[
                ('id', models.IntegerField(blank=True, db_index=True)),
                ('is_deleted', models.BooleanField(default=False, verbose_name='Eliminado')),
                ('created_at', models.DateField(blank=True, editable=False, verbose_name='Fecha de Creación')),
                ('updated_at', models.DateField(blank=True, editable=False, verbose_name='Fecha de Modificación')),
                ('deleted_at', models.DateField(blank=True, null=True, verbose_name='Fecha de Eliminación')),
                ('category_name', models.CharField(db_index=True, max_length=150, verbose_name='Nombre de Categoría')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Descripción')),
                ('category_image', models.TextField(blank=True, max_length=100, null=True, verbose_name='Imagen de Categoría')),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField(db_index=True)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical Categoría',
                'verbose_name_plural': 'historical Categorías',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': ('history_date', 'history_id'),
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalProduct',
            fields=[
                ('id', models.IntegerField(blank=True, db_index=True)),
                ('is_deleted', models.BooleanField(default=False, verbose_name='Eliminado')),
                ('created_at', models.DateField(blank=True, editable=False, verbose_name='Fecha de Creación')),
                ('updated_at', models.DateField(blank=True, editable=False, verbose_name='Fecha de Modificación')),
                ('deleted_at', models.DateField(blank=True, null=True, verbose_name='Fecha de Eliminación')),
                ('product_name', models.CharField(max_length=200, verbose_name='Nombre del Producto')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Descripción')),
                ('height_cm', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='Alto (cm)')),
                ('depth_cm', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='Profundo (cm)')),
                ('width_cm', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='Ancho (cm)')),
                ('security', models.CharField(blank=True, max_length=255, null=True, verbose_name='Seguridad')),
                ('price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='Precio')),
                ('product_image', models.TextField(blank=True, max_length=100, null=True, verbose_name='Imagen del Producto')),
                ('product_type', models.CharField(max_length=100, verbose_name='Tipo de Producto')),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField(db_index=True)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('category', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='product.category', verbose_name='Categoría')),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical Producto',
                'verbose_name_plural': 'historical Productos',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': ('history_date', 'history_id'),
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False, verbose_name='Eliminado')),
                ('created_at', models.DateField(auto_now_add=True, verbose_name='Fecha de Creación')),
                ('updated_at', models.DateField(auto_now=True, verbose_name='Fecha de Modificación')),
                ('deleted_at', models.DateField(blank=True, null=True, verbose_name='Fecha de Eliminación')),
                ('product_name', models.CharField(max_length=200, verbose_name='Nombre del Producto')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Descripción')),
                ('height_cm', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='Alto (cm)')),
                ('depth_cm', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='Profundo (cm)')),
                ('width_cm', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='Ancho (cm)')),
                ('security', models.CharField(blank=True, max_length=255, null=True, verbose_name='Seguridad')),
                ('price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='Precio')),
                ('product_image', models.ImageField(blank=True, null=True, upload_to='products/', verbose_name='Imagen del Producto')),
                ('product_type', models.CharField(max_length=100, verbose_name='Tipo de Producto')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='product.category', verbose_name='Categoría')),
            ],
            options={
                'verbose_name': 'Producto',
                'verbose_name_plural': 'Productos',
                'ordering': ['product_name'],
            },
        ),
    ]
