# Generated by Django 2.0.6 on 2019-05-07 09:53

import cycles.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Cycle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('model', models.CharField(max_length=30)),
                ('image', models.ImageField(upload_to=cycles.models.upload_image_to)),
                ('is_picked', models.BooleanField(default=False)),
                ('rent', models.IntegerField(default=0)),
                ('rating', models.IntegerField(default=0)),
                ('picked_times', models.IntegerField(default=0)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Dropcycle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('drop_date', models.DateTimeField(auto_now=True)),
                ('cycle_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cycles.Cycle')),
                ('drop_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('area', models.CharField(max_length=30)),
                ('near_by', models.CharField(max_length=30)),
                ('near_by_t', models.CharField(max_length=30)),
                ('gps_lat', models.CharField(max_length=30)),
                ('gps_lon', models.CharField(max_length=30)),
                ('cycle_id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='cycles.Cycle')),
            ],
        ),
        migrations.CreateModel(
            name='Pickcycle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pick_date', models.DateTimeField(auto_now=True)),
                ('cycle_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cycles.Cycle')),
                ('picked_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
