# Generated by Django 2.2.6 on 2019-10-16 22:11

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='InventoryItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('inventory_count', models.IntegerField()),
                ('description', models.TextField(max_length=2000)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ordersystem.Order')),
            ],
        ),
        migrations.CreateModel(
            name='UserAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('username', models.CharField(max_length=15, unique=True)),
                ('email', models.EmailField(max_length=100, unique=True)),
                ('password', models.CharField(max_length=30)),
            ],
            options={
                'ordering': ['last_name'],
            },
        ),
        migrations.CreateModel(
            name='AdminAccount',
            fields=[
                ('useraccount_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ordersystem.UserAccount')),
            ],
            bases=('ordersystem.useraccount',),
        ),
        migrations.CreateModel(
            name='OrderSystem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ordersystem.UserAccount')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ordersystem.Order')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='CustomerAccount',
            fields=[
                ('useraccount_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ordersystem.UserAccount')),
                ('favorite_item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ordersystem.InventoryItem')),
                ('favorite_order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='favorite_order', to='ordersystem.Order')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ordersystem.Order')),
            ],
            bases=('ordersystem.useraccount',),
        ),
    ]
