# Generated by Django 3.1.1 on 2020-09-14 03:00

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('product', '0001_initial'),
        ('user', '0003_auto_20200914_0232'),
    ]

    operations = [
        migrations.CreateModel(
            name='Sell',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='StatusSell',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('state', models.CharField(max_length=30)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('code', models.CharField(max_length=25)),
                ('sell_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.sell')),
            ],
        ),
        migrations.CreateModel(
            name='ShoppingCart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('sub_total', models.FloatField()),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('canceled', models.BooleanField()),
                ('finish', models.BooleanField()),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
        ),
        migrations.CreateModel(
            name='SellDeatil',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('sub_total', models.FloatField()),
                ('product_detail', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.productdetail')),
                ('shopping_cart_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.shoppingcart')),
            ],
        ),
        migrations.AddField(
            model_name='sell',
            name='shopping_carg_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.shoppingcart'),
        ),
    ]
