# Generated by Django 2.2.1 on 2019-06-19 20:55

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id', models.UUIDField(primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='Введите название товара')),
                ('price', models.FloatField(help_text='Введите цену')),
                ('qty', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Users',
            fields=[
                ('id', models.UUIDField(primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='Введите имя')),
            ],
        ),
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.UUIDField(primary_key=True, serialize=False)),
                ('date_time', models.DateField(auto_now=True)),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Users')),
            ],
        ),
        migrations.CreateModel(
            name='OrderGoods',
            fields=[
                ('id', models.UUIDField(primary_key=True, serialize=False)),
                ('order_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Orders')),
                ('price', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Goods')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Users')),
            ],
        ),
        migrations.AddField(
            model_name='goods',
            name='user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.Users'),
        ),
    ]
