# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-03-19 17:06
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Fountain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('lat', models.FloatField()),
                ('lng', models.FloatField()),
                ('image', models.ImageField(default='fountain_images/default2.jpg', upload_to='fountain_images')),
                ('description', models.CharField(max_length=250)),
                ('floor', models.IntegerField()),
                ('reviews', models.IntegerField(default=0)),
                ('rating', models.IntegerField(default=0)),
                ('numberratings', models.IntegerField(default=0)),
                ('avgrating', models.FloatField(blank=True, default=0, null=True)),
                ('popularity', models.IntegerField(default=0)),
                ('broken', models.BooleanField(default='False')),
                ('building', models.CharField(max_length=32, null=True)),
                ('slug', models.SlugField()),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('points', models.IntegerField(default=0)),
                ('fountain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='findafountain.Fountain')),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('text', models.CharField(max_length=250)),
                ('fountain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='findafountain.Fountain')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ImageField(blank=True, default='profile_images/default.png', upload_to='profile_images')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='review',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='findafountain.UserProfile'),
        ),
        migrations.AddField(
            model_name='rating',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='findafountain.UserProfile'),
        ),
    ]
