# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-20 20:20
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='Chat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('deleted', models.BooleanField(default=False)),
                ('time', models.DateTimeField(auto_now=True)),
                ('group', models.CharField(default='', max_length=50)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='has_chats', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author', models.CharField(max_length=200)),
                ('text', models.TextField(blank=True, null=True)),
                ('created_time', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Friend',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('friend', models.ManyToManyField(related_name='friend', to=settings.AUTH_USER_MODEL)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FriendNotification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(default='', max_length=100)),
                ('types', models.CharField(default='', max_length=20)),
                ('reciever', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reciever_friend', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sender_friend', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(default='', max_length=50)),
                ('address', models.CharField(default='', max_length=100)),
                ('size', models.IntegerField(default=1)),
                ('introduction', models.CharField(default='', max_length=400)),
                ('cost', models.DecimalField(decimal_places=2, default=0.0, max_digits=5)),
                ('date_begin', models.DateTimeField()),
                ('date_end', models.DateTimeField()),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('member', models.ManyToManyField(related_name='member', to=settings.AUTH_USER_MODEL)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='GroupNotification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(default='', max_length=100)),
                ('types', models.CharField(default='', max_length=20)),
                ('group', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='SportsLover.Group')),
                ('reciever', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_reciever', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_sender', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Info',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
                ('age', models.CharField(blank=True, default='', max_length=20)),
                ('bio', models.CharField(blank=True, default='', max_length=420)),
                ('image', models.ImageField(blank=True, default='empty.png', upload_to='photos')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(default='', max_length=100)),
                ('status', models.CharField(default='incomplete', max_length=100)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SportsLover.Group')),
                ('reciever', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reciever', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Place',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=40)),
                ('address', models.CharField(default='', max_length=100)),
                ('cost', models.DecimalField(decimal_places=2, default=0.0, max_digits=5)),
                ('rank', models.DecimalField(decimal_places=2, default=0.0, max_digits=5)),
                ('visitor', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Rank',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rank', models.IntegerField(default=5)),
                ('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='place', to='SportsLover.Place')),
            ],
        ),
        migrations.CreateModel(
            name='Sale',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('charge_id', models.CharField(max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='SportsClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
            ],
        ),
        migrations.CreateModel(
            name='SportsItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item', models.CharField(max_length=40)),
                ('label', models.ManyToManyField(to='SportsLover.SportsClass')),
            ],
        ),
        migrations.AddField(
            model_name='group',
            name='place',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SportsLover.Place'),
        ),
        migrations.AddField(
            model_name='group',
            name='sportsclass',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SportsLover.SportsClass'),
        ),
        migrations.AddField(
            model_name='group',
            name='sportsitem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='SportsLover.SportsItem'),
        ),
        migrations.AddField(
            model_name='comment',
            name='place',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='SportsLover.Place'),
        ),
    ]
