# Generated by Django 3.2.4 on 2021-06-22 17:57

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


class Migration(migrations.Migration):

    dependencies = [
        ('mini_store_app', '0003_rename_lastlname_user_lastname'),
    ]

    operations = [
        migrations.RenameField(
            model_name='cart',
            old_name='buyer_id',
            new_name='customer_id',
        ),
        migrations.RenameField(
            model_name='orders',
            old_name='buyer_id',
            new_name='customer_id',
        ),
        migrations.RemoveField(
            model_name='products',
            name='cart_id',
        ),
        migrations.RemoveField(
            model_name='products',
            name='order_id',
        ),
        migrations.AddField(
            model_name='cart',
            name='amount',
            field=models.DecimalField(decimal_places=2, max_digits=5, null=True),
        ),
        migrations.AddField(
            model_name='orders',
            name='amount',
            field=models.DecimalField(decimal_places=2, max_digits=5, null=True),
        ),
        migrations.AlterField(
            model_name='products',
            name='price',
            field=models.DecimalField(decimal_places=2, max_digits=5),
        ),
        migrations.CreateModel(
            name='CartItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(default=1)),
                ('cart_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mini_store_app.cart')),
                ('product_id', models.ManyToManyField(to='mini_store_app.Products')),
            ],
        ),
    ]
