# Generated by Django 3.1.7 on 2021-04-01 08:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('address', models.CharField(blank=True, max_length=128)),
                ('telephone', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None)),
                ('social_media', models.CharField(blank=True, max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_id', models.CharField(max_length=32)),
                ('order_date', models.DateField()),
                ('delivery_date', models.DateField()),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders_app.customer')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Store',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('address', models.CharField(max_length=128)),
                ('telephone', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
            ],
        ),
        migrations.CreateModel(
            name='OrderProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('amount', models.FloatField(blank=True)),
                ('color1', models.CharField(blank=True, max_length=128)),
                ('color2', models.CharField(blank=True, max_length=128)),
                ('color3', models.CharField(blank=True, max_length=128)),
                ('attr1', models.CharField(blank=True, max_length=128)),
                ('attr2', models.CharField(blank=True, max_length=128)),
                ('attr3', models.CharField(blank=True, max_length=128)),
                ('attr4', models.CharField(blank=True, max_length=128)),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders_app.order')),
                ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders_app.product')),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='order_products',
            field=models.ManyToManyField(related_name='_order_order_products_+', to='orders_app.OrderProduct'),
        ),
        migrations.AddField(
            model_name='order',
            name='store',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders_app.store'),
        ),
    ]
