# Generated by Django 2.1 on 2019-01-31 18:41

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('main', '0002_auto_20190121_0142'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=40)),
                ('lastname', models.CharField(max_length=40)),
                ('phone', models.CharField(max_length=20)),
                ('address', models.CharField(max_length=255)),
                ('buying_type', models.CharField(choices=[('Caмовивоз', 'Caмовивоз'), ('Доставка', 'Доставка')], max_length=40)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('comments', models.TextField()),
                ('status', models.CharField(choices=[('Принят', 'Принят'), ('Выполняется', 'Виполняется'), ('Оплачен', 'Оплачен')], max_length=100)),
                ('total', models.DecimalField(decimal_places=2, default=0, max_digits=9)),
            ],
        ),
        migrations.AlterField(
            model_name='cart',
            name='item',
            field=models.ManyToManyField(blank=True, to='main.CartItem'),
        ),
        migrations.AddField(
            model_name='order',
            name='items',
            field=models.ManyToManyField(to='main.Cart'),
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(on_delete=False, to=settings.AUTH_USER_MODEL),
        ),
    ]
