# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-15 04:32
from __future__ import unicode_literals

from django.conf import settings
import django.contrib.auth.models
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('username', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('phonenumber', models.CharField(help_text="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", max_length=15)),
                ('age', models.IntegerField(default=0)),
                ('weight', models.IntegerField(default=0)),
                ('height', models.IntegerField(default=0)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], default='M', help_text="valid values are 'M' - male, 'F' - female", max_length=1)),
                ('country', models.CharField(max_length=255)),
                ('active', models.BooleanField(default=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', django.contrib.postgres.fields.jsonb.JSONField()),
            ],
        ),
        migrations.CreateModel(
            name='Route',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('min_lat', models.FloatField()),
                ('min_long', models.FloatField()),
                ('max_lat', models.FloatField()),
                ('max_long', models.FloatField()),
                ('routeid', models.IntegerField()),
                ('parentid', models.IntegerField()),
                ('data', django.contrib.postgres.fields.jsonb.JSONField(help_text='GeoJSON route data')),
                ('atype', models.CharField(choices=[('W', 'Walking'), ('R', 'Running'), ('B', 'Biking')], default='W', help_text="Valid values for this are 'W' - walking, 'R' - running, 'B' - biking", max_length=1)),
                ('user', models.ForeignKey(help_text='The fully qualified URL of the user - http://<domain>/users/{username}/', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Run',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateField(auto_now_add=True)),
                ('run_time', models.IntegerField()),
                ('route_id', models.ForeignKey(help_text='The fully qualified URL of the route - http://<domain>/routes/{routeid}/', on_delete=django.db.models.deletion.CASCADE, to='api.Route')),
                ('user', models.ForeignKey(help_text='The fully qualified URL of the user - http://<domanin>/users/{username}/', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
