# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-16 04:03
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Equipment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('created_date', models.DateTimeField()),
                ('equipment_type', models.CharField(choices=[('bike', 'Bike')], default='bike', max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='EquipmentActivity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('date_of_activity', models.DateTimeField()),
                ('length_km', models.DecimalField(decimal_places=2, max_digits=10)),
                ('elapsed_time', models.DurationField(default=datetime.timedelta(0))),
                ('moving_time', models.DurationField(default=datetime.timedelta(0))),
                ('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fmb.Equipment')),
            ],
        ),
        migrations.CreateModel(
            name='MaintenanceActivity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_of_maintenance', models.DateTimeField()),
                ('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fmb.Equipment')),
            ],
        ),
        migrations.CreateModel(
            name='MaintenanceTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=500)),
                ('interval', models.IntegerField()),
                ('interval_type', models.CharField(choices=[('km', 'km'), ('hr', 'Hours (used)'), ('d', 'Days (total)'), ('m', 'Months (total)')], default='km', max_length=2)),
                ('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fmb.Equipment')),
            ],
        ),
        migrations.AddField(
            model_name='maintenanceactivity',
            name='maintenance_task',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fmb.MaintenanceTask'),
        ),
    ]
