# Generated by Django 2.0.4 on 2020-03-01 15:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('userApp', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(default=0)),
                ('supplier', models.CharField(max_length=40)),
                ('hospital', models.CharField(max_length=40)),
                ('hospital_code', models.CharField(max_length=20)),
                ('order_time', models.DateTimeField(null=True)),
                ('delivery_time', models.DateTimeField(null=True)),
                ('hosp_status', models.CharField(choices=[('REC', 'Received'), ('DIS', 'Dispatched'), ('PEN', 'Pending'), ('DEL', 'Delivered'), ('REQ', 'Requested')], default='NA', max_length=5)),
                ('supp_status', models.CharField(choices=[('REC', 'Received'), ('DIS', 'Dispatched'), ('PEN', 'Pending'), ('DEL', 'Delivered'), ('REQ', 'Requested')], default='NA', max_length=5)),
            ],
        ),
        migrations.RemoveField(
            model_name='hospitalcategory',
            name='category',
        ),
        migrations.RemoveField(
            model_name='hospitalcategory',
            name='hospital',
        ),
        migrations.RemoveField(
            model_name='hospitalitems',
            name='item',
        ),
        migrations.RemoveField(
            model_name='hospitalitems',
            name='item_category',
        ),
        migrations.RemoveField(
            model_name='hospitalorder',
            name='item',
        ),
        migrations.RemoveField(
            model_name='suppliercategory',
            name='category',
        ),
        migrations.RemoveField(
            model_name='suppliercategory',
            name='supplier',
        ),
        migrations.RemoveField(
            model_name='supplieritems',
            name='item',
        ),
        migrations.RemoveField(
            model_name='supplieritems',
            name='item_category',
        ),
        migrations.RemoveField(
            model_name='supplierorder',
            name='item',
        ),
        migrations.AlterModelOptions(
            name='itemcategory',
            options={'verbose_name_plural': 'ItemCategories'},
        ),
        migrations.RemoveField(
            model_name='hospitalprofile',
            name='supplier',
        ),
        migrations.AddField(
            model_name='item',
            name='hospital',
            field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='userApp.HospitalProfile'),
            preserve_default=False,
        ),
        migrations.RemoveField(
            model_name='supplierprofile',
            name='hospital',
        ),
        migrations.AddField(
            model_name='supplierprofile',
            name='hospital',
            field=models.ManyToManyField(blank=True, related_name='hospitals', to='userApp.HospitalProfile'),
        ),
        migrations.DeleteModel(
            name='HospitalCategory',
        ),
        migrations.DeleteModel(
            name='HospitalItems',
        ),
        migrations.DeleteModel(
            name='HospitalOrder',
        ),
        migrations.DeleteModel(
            name='SupplierCategory',
        ),
        migrations.DeleteModel(
            name='SupplierItems',
        ),
        migrations.DeleteModel(
            name='SupplierOrder',
        ),
        migrations.AddField(
            model_name='order',
            name='item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='userApp.Item'),
        ),
    ]
