# Generated by Django 3.2.5 on 2021-08-02 09:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('atributes', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='Nom')),
                ('slug', models.SlugField(max_length=150, unique=True, verbose_name='URL')),
            ],
            options={
                'verbose_name': 'Catégorie',
                'verbose_name_plural': '1. Categories',
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='Nom')),
                ('slug', models.SlugField(max_length=150, unique=True, verbose_name='URL')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sub_categories', to='core.category', verbose_name='Catégorie')),
            ],
            options={
                'verbose_name': 'Sous Catégorie',
                'verbose_name_plural': '3. Sous Catégorie',
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='Nom')),
                ('slug', models.SlugField(max_length=150, unique=True, verbose_name='URL')),
                ('description', tinymce.models.HTMLField(blank=True, null=True, verbose_name='Déscription')),
                ('price', models.DecimalField(decimal_places=2, default=1, max_digits=10)),
                ('old_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='Ancien prix')),
                ('available', models.BooleanField(default=True, verbose_name='Disponible')),
                ('new', models.BooleanField(default=True, verbose_name='Nouveau')),
                ('top', models.BooleanField(default=True, verbose_name='Meilleur vente')),
                ('status', models.CharField(blank=True, choices=[('N', 'Nouveau'), ('R', 'Rupture'), ('P', 'Promotion')], default='N', max_length=1, null=True, verbose_name='Status')),
                ('photo1', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo2', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo3', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo4', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo6', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo7', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo8', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo9', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('photo10', models.ImageField(blank=True, null=True, upload_to='images/produits')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Date de Création')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Date de dernière mise à jour')),
                ('collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atributes.collection')),
                ('couleur', models.ManyToManyField(to='atributes.Couleur')),
                ('pointure', models.ManyToManyField(to='atributes.Pointure')),
                ('sous_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='core.subcategory', verbose_name='Sous Catégorie')),
                ('taille', models.ManyToManyField(to='atributes.Taille')),
            ],
            options={
                'verbose_name': 'Produit',
                'verbose_name_plural': '4. Produits',
                'ordering': ('id',),
            },
        ),
    ]
