# Generated by Django 3.2 on 2021-05-10 20:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('sessions', '0001_initial'),
        ('main', '0015_auto_20210510_1626'),
    ]

    operations = [
        migrations.CreateModel(
            name='CartContains',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Quantity', models.IntegerField()),
                ('ItemID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.items')),
            ],
        ),
        migrations.RemoveField(
            model_name='order',
            name='AccountID',
        ),
        migrations.AddField(
            model_name='order',
            name='TotalPrice',
            field=models.IntegerField(default=0),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='ordercontains',
            name='ItemID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.items'),
        ),
        migrations.AlterField(
            model_name='sessionhistory',
            name='SessionID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sessions.session'),
        ),
        migrations.AlterField(
            model_name='sessionhistory',
            name='id',
            field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
        ),
        migrations.CreateModel(
            name='ShoppingCart',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ItemsInCart', models.ManyToManyField(to='main.CartContains')),
                ('SessionID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sessions.session')),
            ],
        ),
        migrations.CreateModel(
            name='ShippingInfo',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('FirstName', models.CharField(max_length=255)),
                ('LastName', models.CharField(max_length=255)),
                ('City', models.CharField(max_length=255)),
                ('PostalCode', models.CharField(max_length=15)),
                ('Address', models.CharField(max_length=255)),
                ('HouseNum', models.IntegerField()),
                ('MobilePhone', models.CharField(max_length=63)),
                ('Email', models.CharField(max_length=255)),
                ('SSN', models.CharField(max_length=255)),
                ('Country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.country')),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='ShippingInfoID',
            field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.PROTECT, to='main.shippinginfo'),
            preserve_default=False,
        ),
    ]
