# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-18 14:17
from __future__ import unicode_literals

from django.conf import settings
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('vehicles', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Laptime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_created=True)),
                ('untuned', models.BooleanField(default=False, help_text='is this in an untuned car?')),
                ('seconds', models.DecimalField(decimal_places=3, default=0.0, max_digits=12)),
                ('seconds_per_km', models.FloatField(default=0.0)),
                ('comment', models.TextField(default='')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Track',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256, unique=True)),
                ('description', models.TextField(blank=True, default='')),
                ('author', models.CharField(default='', max_length=64)),
                ('link', models.URLField(null=True)),
                ('game_mode', models.CharField(choices=[('stunt', 'stunt race'), ('land', 'land race')], max_length=8)),
                ('route_type', models.CharField(choices=[('l', 'laps'), ('p', 'point to point')], max_length=1)),
                ('route_length_km', models.FloatField(null=True)),
                ('num_players', models.PositiveSmallIntegerField(null=True)),
                ('median_laptime', models.IntegerField(help_text='How many seconds does it typically take for a fully customized car to finish a lap with no major issues?', null=True)),
                ('pit_lane', models.BooleanField(default=False, help_text='Does the track have a pit lane with repair icons?')),
                ('surface_street', models.SmallIntegerField(default=0, help_text='Typical streets in Los Santos')),
                ('surface_road', models.SmallIntegerField(default=0, help_text='Tarmac roads e.g. Blaine County')),
                ('surface_highway', models.SmallIntegerField(default=0, help_text='Highways in Los Santos and around San Andreas')),
                ('surface_dirt', models.SmallIntegerField(default=0, help_text='Non-tarmac dirt roads e.g. in Sandy Shores')),
                ('surface_flat', models.SmallIntegerField(default=0, help_text='Tarmac and concrete surface at LS airport, Fort Zancudo and similar areas')),
                ('surface_stunt', models.SmallIntegerField(default=0, help_text='Surfaces made with stunt props.')),
                ('surface_offroad', models.SmallIntegerField(default=0, help_text='Anything offroad e.g. forests, fields, grasslands, desert')),
                ('elevation_changes', models.SmallIntegerField(default=0, help_text='From airport-flat (0), to Tongva Hills (50) to rollercoastery ups and downs (100).')),
                ('car_classes', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=256), size=None)),
            ],
        ),
        migrations.AddField(
            model_name='laptime',
            name='track',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tracks.Track'),
        ),
        migrations.AddField(
            model_name='laptime',
            name='vehicle',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vehicles.Vehicle'),
        ),
    ]
