# Generated by Django 3.1.5 on 2021-02-11 03:57

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


class Migration(migrations.Migration):

    dependencies = [
        ('shop', '0009_slidercontent'),
    ]

    operations = [
        migrations.CreateModel(
            name='CartProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quanty', models.PositiveIntegerField(default=1)),
                ('price', models.PositiveIntegerField(default=0, verbose_name='Tovar narxi')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.product', verbose_name='Tovar')),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_products', models.PositiveIntegerField(default=0)),
                ('total_price', models.PositiveIntegerField(default=0, verbose_name='Umumiy narxi')),
                ('products', models.ManyToManyField(null=True, related_name='savatcha_tovar', to='shop.CartProduct')),
            ],
        ),
    ]
