# Generated by Django 2.0 on 2018-04-14 02:56

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


class Migration(migrations.Migration):

    dependencies = [
        ('dtpmapapp', '0002_auto_20180412_0222'),
    ]

    operations = [
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brand', models.CharField(blank=True, db_index=True, default=None, help_text='Car brand', max_length=1000, null=True)),
                ('car_model', models.CharField(blank=True, db_index=True, default=None, help_text='Car model', max_length=1000, null=True)),
                ('manufacture_year', models.DateField(blank=True, db_index=True, default=None, help_text='MVC date', null=True)),
                ('color', models.CharField(blank=True, db_index=True, default=None, help_text='Car color', max_length=1000, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='MVC',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(blank=True, db_index=True, default=None, help_text='MVC date', null=True)),
                ('address', models.CharField(blank=True, db_index=True, default=None, help_text='MVC address', max_length=1000, null=True)),
                ('longitude', models.FloatField(blank=True, default=None, help_text='MVC longitude', null=True)),
                ('latitude', models.FloatField(blank=True, default=None, help_text='MVC longitude', null=True)),
                ('conditions', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=None, help_text='MVC conditions', null=True)),
                ('dead', models.IntegerField(blank=True, db_index=True, default=None, help_text='MVC dead count', null=True)),
                ('injured', models.IntegerField(blank=True, db_index=True, default=None, help_text='MVC injured count', null=True)),
            ],
        ),
        migrations.CreateModel(
            name='MVCType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, db_index=True, default=None, help_text='MVC Type name', max_length=1000, null=True)),
                ('alias', models.CharField(blank=True, db_index=True, default=None, help_text='MVC Type alias', max_length=1000, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Nearby',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, db_index=True, default=None, help_text='Nearby object name', max_length=1000, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Offence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, db_index=True, default=None, help_text='Car brand', max_length=1000, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(blank=True, db_index=True, default=None, help_text='Participant role', max_length=1000, null=True)),
                ('driving_experience', models.IntegerField(blank=True, help_text='Participant driving experience (years)', null=True)),
                ('status', models.CharField(blank=True, default=None, help_text='Participant status', max_length=1000, null=True)),
                ('gender', models.CharField(blank=True, default=None, help_text='Participant gender', max_length=1000, null=True)),
                ('abscond', models.CharField(blank=True, default=None, help_text='Participant abscond', max_length=1000, null=True)),
                ('offences', models.ManyToManyField(blank=True, db_index=True, default=None, help_text='Participant offences', null=True, to='dtpmapapp.Offence')),
            ],
        ),
        migrations.AddField(
            model_name='mvc',
            name='type',
            field=models.ForeignKey(blank=True, default=None, help_text='MVC Type', null=True, on_delete=django.db.models.deletion.SET_NULL, to='dtpmapapp.MVCType'),
        ),
    ]
