# Generated by Django 2.0.7 on 2018-07-17 11:05

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


class Migration(migrations.Migration):

    dependencies = [
        ('inventory', '0007_networkswitch'),
    ]

    operations = [
        migrations.CreateModel(
            name='AdditionalItem',
            fields=[
                ('id', models.CharField(help_text='Enter the id of the item', max_length=10, primary_key=True, serialize=False)),
                ('name', models.CharField(help_text='What is the item called?', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id', models.CharField(help_text='Enter the id of room', max_length=20, primary_key=True, serialize=False)),
                ('floor', models.PositiveSmallIntegerField(help_text='In which floor is this room?')),
            ],
        ),
        migrations.CreateModel(
            name='RoomHasAdditionalItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveSmallIntegerField(help_text='Enter the number of items')),
                ('no_of_defect_items', models.PositiveSmallIntegerField(help_text='How many items are defect?')),
                ('last_modified', models.DateTimeField(auto_now=True, null=True)),
                ('additional_item', models.ForeignKey(help_text='Select the Additional Item', on_delete=django.db.models.deletion.CASCADE, to='inventory.AdditionalItem')),
                ('room', models.ForeignKey(help_text='Select the Room', on_delete=django.db.models.deletion.CASCADE, to='inventory.Room')),
            ],
        ),
        migrations.AddField(
            model_name='room',
            name='additional_item',
            field=models.ManyToManyField(help_text='Additional Item', through='inventory.RoomHasAdditionalItem', to='inventory.AdditionalItem'),
        ),
    ]
