# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-01 12:59
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('title', models.CharField(blank=True, max_length=200, null=True)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='PickUpRequest',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('answered', models.BooleanField(default=False)),
                ('accepted', models.BooleanField(default=False)),
                ('currentLocation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='currentLocation', to='hitchcar.Location')),
                ('destination', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='destination', to='hitchcar.Location')),
            ],
        ),
        migrations.CreateModel(
            name='Ride',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('startTime', models.DateTimeField(auto_now_add=True)),
                ('active', models.BooleanField(default=True)),
                ('rideDestination', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='rideDestination', to='hitchcar.Location')),
                ('rideStart', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='rideStart', to='hitchcar.Location')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Waypoint',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('ride', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='hitchcar.Ride')),
                ('waypointLocation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='waypointLocation', to='hitchcar.Location')),
            ],
        ),
        migrations.AddField(
            model_name='pickuprequest',
            name='ride',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='hitchcar.Ride'),
        ),
        migrations.AddField(
            model_name='pickuprequest',
            name='user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
        ),
    ]
