# Generated by Django 2.0.5 on 2018-09-03 18:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('catalog', '0004_usersession_create_date'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(max_length=128)),
                ('create_date', models.DateField(auto_now=True)),
                ('update', models.DateField(null=True)),
                ('summa_invoice', models.IntegerField(default=0)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cost', models.FloatField(default=0.0)),
                ('count', models.IntegerField(default=0)),
                ('nomenclature', models.CharField(max_length=50)),
                ('brend', models.CharField(max_length=50)),
                ('articul', models.CharField(max_length=50)),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders.Order')),
                ('priceitem', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='catalog.Price')),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='catalog.Provider')),
            ],
        ),
    ]
