# Generated by Django 3.0.7 on 2020-09-02 17:29

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('product', '0002_migration_product'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='product',
            name='conditioning_purchase',
        ),
        migrations.RemoveField(
            model_name='product',
            name='conditioning_sale',
        ),
        migrations.AlterField(
            model_name='producttaxation',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='product.Product', verbose_name='Produit associée'),
        ),
        migrations.CreateModel(
            name='ProductPackaging',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_packaging', models.CharField(choices=[('SALE', 'SALE'), ('PURCHASE', 'PURCHASE')], max_length=10, verbose_name='Type de conditionnement')),
                ('slug', models.SlugField(max_length=100)),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('update_at', models.DateTimeField(auto_now=True, verbose_name='Date de dernière modification')),
                ('conditioning', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='product.Conditioning', verbose_name='Conditioning associée')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='product.Product', verbose_name='Produit associée')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='product_product_packagings', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Packaging des produits',
                'ordering': ['created_at'],
            },
        ),
    ]
