# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-01-27 22:49
from __future__ import unicode_literals

import api.models
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('type', models.CharField(choices=[('PA', 'Pastor Aleman'), ('CH', 'Chihuhua'), ('PT', 'Pitbull'), ('LA', 'Labrador')], max_length=2)),
                ('created', models.DateTimeField(auto_now_add=True, db_column='created')),
                ('updated', models.DateTimeField(auto_now=True, db_column='updated')),
            ],
            options={
                'db_table': 'dog',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='DogOwner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, db_column='created')),
                ('updated', models.DateTimeField(auto_now=True, db_column='updated')),
                ('dog', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Dog')),
            ],
            options={
                'db_table': 'dog_owner',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Favorite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, db_column='created')),
                ('updated', models.DateTimeField(auto_now=True, db_column='updated')),
            ],
            options={
                'db_table': 'reserver',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lat', models.FloatField(blank=True)),
                ('lng', models.FloatField(blank=True)),
                ('createdat', models.DateTimeField(auto_now_add=True, db_column='created_at')),
                ('updatedat', models.DateTimeField(auto_now=True, db_column='updated_at')),
            ],
            options={
                'db_table': 'location',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(default=0)),
                ('start_service', models.DateTimeField()),
                ('finish_service', models.DateTimeField()),
                ('createdat', models.DateTimeField(auto_now_add=True, db_column='created_at')),
                ('updatedat', models.DateTimeField(auto_now=True, db_column='updated_at')),
                ('dog', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Dog')),
            ],
        ),
        migrations.CreateModel(
            name='Users',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=255, unique=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('image', models.ImageField(blank=True, default='profile/default.jpg', null=True, upload_to=api.models.path_and_rename)),
                ('firstname', models.CharField(max_length=124)),
                ('lastname', models.CharField(blank=True, max_length=124, null=True)),
                ('email', models.CharField(max_length=255, unique=True)),
                ('password', models.CharField(max_length=128)),
                ('token', models.CharField(blank=True, max_length=255, null=True)),
                ('recoverpassword', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(auto_now_add=True, db_column='created')),
                ('updated', models.DateTimeField(auto_now=True, db_column='updated')),
            ],
            options={
                'db_table': 'Users',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='DogWalker',
            fields=[
                ('users_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.Users')),
                ('favorite', models.BooleanField(default=False)),
                ('ranking', models.FloatField(default=5.0)),
            ],
            options={
                'db_table': 'dog_walker',
                'managed': True,
            },
            bases=('api.users',),
        ),
        migrations.CreateModel(
            name='Owner',
            fields=[
                ('users_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.Users')),
            ],
            options={
                'db_table': 'owner',
                'managed': True,
            },
            bases=('api.users',),
        ),
        migrations.AddField(
            model_name='location',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.Users'),
        ),
        migrations.AddField(
            model_name='service',
            name='dogwalker',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.DogWalker'),
        ),
        migrations.AddField(
            model_name='favorite',
            name='dogwalker',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dogwalker_favorite', to='api.DogWalker'),
        ),
        migrations.AddField(
            model_name='favorite',
            name='owner',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Owner'),
        ),
        migrations.AddField(
            model_name='dogowner',
            name='owner',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Owner'),
        ),
    ]
