# Generated by Django 2.2.7 on 2020-01-18 18:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Classification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='DryClean',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('service', models.CharField(max_length=100)),
                ('description', models.TextField(max_length=500)),
                ('price', models.DecimalField(blank=True, decimal_places=3, max_digits=5, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Iron',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('service', models.CharField(max_length=100)),
                ('description', models.TextField(max_length=500)),
                ('price', models.DecimalField(blank=True, decimal_places=3, max_digits=5, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_name', models.CharField(max_length=120)),
                ('classification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='laundry.Classification')),
                ('dry_clean', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='laundry.DryClean')),
                ('iron', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='laundry.Iron')),
            ],
        ),
        migrations.CreateModel(
            name='Laundry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('service', models.CharField(max_length=100)),
                ('description', models.TextField(max_length=500)),
                ('price', models.DecimalField(blank=True, decimal_places=3, max_digits=5, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_time', models.DateTimeField(auto_now_add=True)),
                ('status', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='laundry.Item')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='laundry.Order')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='laundry',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='laundry.Laundry'),
        ),
    ]
