# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-11-23 09:55
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('wdapp', '0010_auto_20181119_0237'),
    ]

    operations = [
        migrations.CreateModel(
            name='DriverExpense',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('expenses_number', models.IntegerField(null=True)),
                ('expense', models.IntegerField(choices=[(1, 'fuel'), (2, 'meal'), (3, 'emergency'), (4, 'other')], null=True)),
                ('amount', models.IntegerField(default=0, null=True)),
            ],
        ),
        migrations.RemoveField(
            model_name='driverexpenses',
            name='driver_id',
        ),
        migrations.RemoveField(
            model_name='driverexpenses',
            name='stop_id',
        ),
        migrations.RenameField(
            model_name='business',
            old_name='name',
            new_name='business',
        ),
        migrations.RenameField(
            model_name='businessorder',
            old_name='distance_from_company_facility',
            new_name='distance_from_company_to_business',
        ),
        migrations.RenameField(
            model_name='cargo',
            old_name='name',
            new_name='cargo',
        ),
        migrations.RenameField(
            model_name='company',
            old_name='company_name',
            new_name='company',
        ),
        migrations.RenameField(
            model_name='trip',
            old_name='other_details',
            new_name='order_details',
        ),
        migrations.RemoveField(
            model_name='business',
            name='city',
        ),
        migrations.RemoveField(
            model_name='business',
            name='state',
        ),
        migrations.RemoveField(
            model_name='business',
            name='zip_code',
        ),
        migrations.RemoveField(
            model_name='businessorder',
            name='cargo_id',
        ),
        migrations.RemoveField(
            model_name='businessorder',
            name='company_id',
        ),
        migrations.RemoveField(
            model_name='businessorder',
            name='name',
        ),
        migrations.RemoveField(
            model_name='businessorder',
            name='preferred_delivery_day',
        ),
        migrations.RemoveField(
            model_name='businessorder',
            name='to',
        ),
        migrations.RemoveField(
            model_name='cargomanifest',
            name='approximate_weight',
        ),
        migrations.RemoveField(
            model_name='cargomanifest',
            name='company',
        ),
        migrations.RemoveField(
            model_name='cargomanifest',
            name='distance_from_company_facility',
        ),
        migrations.RemoveField(
            model_name='cargomanifest',
            name='name',
        ),
        migrations.RemoveField(
            model_name='cargomanifest',
            name='order_created',
        ),
        migrations.RemoveField(
            model_name='cargomanifest',
            name='order_updated',
        ),
        migrations.RemoveField(
            model_name='cargomanifest',
            name='to',
        ),
        migrations.RemoveField(
            model_name='company',
            name='city',
        ),
        migrations.RemoveField(
            model_name='company',
            name='logo',
        ),
        migrations.RemoveField(
            model_name='driver',
            name='company_name',
        ),
        migrations.RemoveField(
            model_name='orderstatus',
            name='created_at',
        ),
        migrations.RemoveField(
            model_name='orderstatus',
            name='driver_id',
        ),
        migrations.RemoveField(
            model_name='record',
            name='driver_id',
        ),
        migrations.RemoveField(
            model_name='trip',
            name='name',
        ),
        migrations.AddField(
            model_name='business',
            name='user',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='business', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='address',
            field=models.CharField(max_length=500, null=True),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='cargo',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='businessorder_cargo_set', to='wdapp.Cargo'),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='company',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='businessorder_company_set', to='wdapp.Company'),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='hazmat_class',
            field=models.IntegerField(choices=[(1, 'Non-hazard'), (2, 'Explosive'), (3, 'Gases'), (4, 'Flammable Liquid'), (5, 'Combustible Liquid'), (6, 'Flammable Solid'), (7, 'Spontanaeously Combustible'), (8, 'Dangerous When Wet'), (10, 'Oxidizer and Organic Peroxide'), (11, 'Poison (Toxic) and Poison Inhalation Hazard'), (12, 'Radioactive'), (models.TextField(blank=True), 'Miscellaneous, and the general Dangerous placard')], null=True),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='preferred_pickup_date',
            field=models.DateTimeField(null=True),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='price',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='businessorder_price_set', to='wdapp.Cargo'),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='service_type',
            field=models.IntegerField(choices=[(0, 'pickup'), (1, 'delivery')], null=True),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='volume',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='businessorder_volume_set', to='wdapp.Cargo'),
        ),
        migrations.AddField(
            model_name='businessorder',
            name='weight',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='businessorder_weight_set', to='wdapp.Cargo'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='address',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_adress_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='cargo_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_cargo_id_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='company_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_company_id_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='hazmat_class',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifest_hazmat_class_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='location',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_location_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='service_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_service_type_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='volume',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_volume_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='cargomanifest',
            name='weight',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_weight_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='company',
            name='address',
            field=models.CharField(max_length=500, null=True),
        ),
        migrations.AddField(
            model_name='driver',
            name='location',
            field=models.CharField(db_index=True, max_length=9, null=True),
        ),
        migrations.AddField(
            model_name='driver',
            name='user',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='driver', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='address',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_adress_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='cargo',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_cargo_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='company_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_company_id_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='date_created',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_date_created_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='location',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_location_set', to='wdapp.Trip'),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='order_details',
            field=models.TextField(null=True),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='order_updated',
            field=models.DateTimeField(null=True),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='picked_at',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='quantity',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_quanity_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='orderstatus',
            name='service_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_service_type_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='record',
            name='company_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='records_company_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AddField(
            model_name='trip',
            name='location',
            field=models.CharField(max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='business',
            name='address',
            field=models.CharField(max_length=500, null=True),
        ),
        migrations.AlterField(
            model_name='business',
            name='updated',
            field=models.DateTimeField(auto_now=True, null=True),
        ),
        migrations.AlterField(
            model_name='businessorder',
            name='business_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='businessorders_business_id_set', to='wdapp.Business'),
        ),
        migrations.AlterField(
            model_name='businessorder',
            name='order_id',
            field=models.IntegerField(null=True),
        ),
        migrations.AlterField(
            model_name='businessorder',
            name='preferred_delivery_date',
            field=models.DateTimeField(null=True),
        ),
        migrations.AlterField(
            model_name='cargo',
            name='cargo_id',
            field=models.IntegerField(null=True),
        ),
        migrations.AlterField(
            model_name='cargo',
            name='price',
            field=models.IntegerField(default=0, null=True),
        ),
        migrations.AlterField(
            model_name='cargo',
            name='volume',
            field=models.IntegerField(null=True),
        ),
        migrations.AlterField(
            model_name='cargo',
            name='weight',
            field=models.IntegerField(null=True),
        ),
        migrations.AlterField(
            model_name='cargomanifest',
            name='date_created',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_date_created_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AlterField(
            model_name='cargomanifest',
            name='driver_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_driver_id_set', to='wdapp.Driver'),
        ),
        migrations.AlterField(
            model_name='cargomanifest',
            name='manifest_id',
            field=models.IntegerField(null=True),
        ),
        migrations.AlterField(
            model_name='cargomanifest',
            name='order_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_order_id_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AlterField(
            model_name='cargomanifest',
            name='point_of_contact',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_point_of_contact_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AlterField(
            model_name='cargomanifest',
            name='quantity',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cargomanifests_quantity_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AlterField(
            model_name='driver',
            name='address',
            field=models.CharField(max_length=500, null=True),
        ),
        migrations.AlterField(
            model_name='driver',
            name='company_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='drivers_company_id_set', to='wdapp.Company'),
        ),
        migrations.AlterField(
            model_name='orderstatus',
            name='business_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_business_id_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AlterField(
            model_name='orderstatus',
            name='name',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_name_set', to='wdapp.Trip'),
        ),
        migrations.AlterField(
            model_name='orderstatus',
            name='order_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='orderstatus_order_id_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AlterField(
            model_name='record',
            name='business_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='records_business_id_set', to='wdapp.BusinessOrder'),
        ),
        migrations.AlterField(
            model_name='record',
            name='manifest_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='records_manifest_id_set', to='wdapp.CargoManifest'),
        ),
        migrations.AlterField(
            model_name='record',
            name='record_id',
            field=models.IntegerField(null=True),
        ),
        migrations.AlterField(
            model_name='record',
            name='trip_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='records_trip_id_set', to='wdapp.Trip'),
        ),
        migrations.AlterField(
            model_name='stop',
            name='driver_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='stop_driver_id_set', to='wdapp.CargoManifest'),
        ),
        migrations.AlterField(
            model_name='stop',
            name='stop_id',
            field=models.IntegerField(null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='average_price_per_gallon',
            field=models.DecimalField(decimal_places=2, max_digits=10, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='beginningOdometer',
            field=models.DecimalField(decimal_places=2, max_digits=10, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='beginnning_weather_conditions',
            field=models.IntegerField(choices=[(1, 'normal'), (2, 'cloudy'), (3, 'rain'), (4, 'snow'), (5, 'hazardous'), (6, 'extremly hazardous')], default=1, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='company_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='trips_company_id_set', to='wdapp.CargoManifest'),
        ),
        migrations.AlterField(
            model_name='trip',
            name='driver_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='trips_driver_id_set', to='wdapp.CargoManifest'),
        ),
        migrations.AlterField(
            model_name='trip',
            name='endingOdometer',
            field=models.DecimalField(decimal_places=2, max_digits=10, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='ending_weather_conditions',
            field=models.IntegerField(choices=[(1, 'normal'), (2, 'cloudy'), (3, 'rain'), (4, 'snow'), (5, 'hazardous'), (6, 'extremly hazardous')], default=1, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='fuel_card_usage',
            field=models.IntegerField(choices=[('Yes', 'yes'), ('No', 'no')], default='Yes', null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='location_end',
            field=models.CharField(max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='location_start',
            field=models.CharField(max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='manifest_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='trips_manifest_id_set', to='wdapp.CargoManifest'),
        ),
        migrations.AlterField(
            model_name='trip',
            name='midway_weather_conditions',
            field=models.IntegerField(choices=[(1, 'normal'), (2, 'cloudy'), (3, 'rain'), (4, 'snow'), (5, 'hazardous'), (6, 'extremly hazardous')], default=1, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='order_created',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='trips_order_created_set', to='wdapp.CargoManifest'),
        ),
        migrations.AlterField(
            model_name='trip',
            name='order_updated',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='trips_order_updated_set', to='wdapp.CargoManifest'),
        ),
        migrations.AlterField(
            model_name='trip',
            name='total_miles_traveled',
            field=models.DecimalField(decimal_places=1, max_digits=4, null=True),
        ),
        migrations.AlterField(
            model_name='trip',
            name='trip_id',
            field=models.IntegerField(null=True),
        ),
        migrations.DeleteModel(
            name='DriverExpenses',
        ),
        migrations.AddField(
            model_name='driverexpense',
            name='driver_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='driverexpenses_driver_id_set', to='wdapp.CargoManifest'),
        ),
        migrations.AddField(
            model_name='driverexpense',
            name='stop_id',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='driverexpenses_stop_id_set', to='wdapp.Stop'),
        ),
    ]
