# Generated by Django 2.1.1 on 2020-07-31 12:05

import datetime
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uid', models.CharField(max_length=10, unique=True)),
                ('color', models.CharField(max_length=20)),
                ('vendor', models.CharField(max_length=20)),
                ('model', models.CharField(max_length=20)),
                ('engine_identifier', models.CharField(max_length=20, unique=True)),
                ('mileage', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Component',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uid', models.CharField(max_length=10, unique=True)),
                ('type', models.IntegerField(choices=[(0, 'engine'), (1, 'body'), (2, 'electrical'), (4, 'chassis')], default=0)),
                ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cars.Car', to_field='uid')),
            ],
        ),
        migrations.CreateModel(
            name='Trip',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('distance', models.IntegerField()),
                ('start_date', models.DateTimeField(default=datetime.datetime.now, null=True)),
                ('end_date', models.DateTimeField(default=datetime.datetime.now, null=True)),
                ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cars.Car', to_field='uid')),
            ],
        ),
    ]
