# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2020-01-24 22:49
from __future__ import unicode_literals

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='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=100)),
                ('text', models.CharField(blank=True, max_length=8128)),
                ('rules', models.CharField(blank=True, max_length=8128)),
                ('awards', models.CharField(blank=True, max_length=8128)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('attachment', models.FileField(blank=True, upload_to='UserProfile.user_directory_path')),
                ('url', models.CharField(blank=True, max_length=256)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=64)),
                ('text', models.CharField(blank=True, max_length=128)),
                ('url', models.CharField(blank=True, max_length=256)),
                ('sender', models.CharField(blank=True, max_length=128)),
                ('date', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=100)),
                ('text', models.CharField(blank=True, max_length=8128)),
                ('rules', models.CharField(blank=True, max_length=8128)),
                ('awards', models.CharField(blank=True, max_length=8128)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('attachment', models.FileField(blank=True, upload_to='UserProfile.user_directory_path')),
                ('url', models.CharField(blank=True, max_length=256)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(blank=True, max_length=128)),
                ('last_name', models.CharField(blank=True, max_length=128)),
                ('avatar', models.ImageField(blank=True, upload_to='avatars')),
                ('birthday', models.DateField(blank=True, default='1990-12-01')),
                ('town', models.CharField(blank=True, max_length=128)),
                ('relationship', models.CharField(blank=True, choices=[('1', 'married'), ('2', 'in relationship'), ('3', 'single')], max_length=128)),
                ('visible_name', models.CharField(blank=True, max_length=128)),
                ('url', models.CharField(blank=True, max_length=256)),
                ('friend_requests', models.ManyToManyField(blank=True, related_name='_userprofile_friend_requests_+', to='profiles.UserProfile')),
                ('friends', models.ManyToManyField(blank=True, related_name='_userprofile_friends_+', to='profiles.UserProfile')),
                ('relation_user', models.ManyToManyField(blank=True, related_name='_userprofile_relation_user_+', to='profiles.UserProfile')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserWall',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.CharField(blank=True, max_length=256)),
                ('profile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='profiles.UserProfile')),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author_post', to='profiles.UserProfile'),
        ),
        migrations.AddField(
            model_name='post',
            name='likes',
            field=models.ManyToManyField(blank=True, related_name='likes_post', to='profiles.UserProfile'),
        ),
        migrations.AddField(
            model_name='post',
            name='parent',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='profiles.UserWall'),
        ),
        migrations.AddField(
            model_name='post',
            name='shares',
            field=models.ManyToManyField(blank=True, related_name='post_share_user', to='profiles.UserProfile'),
        ),
        migrations.AddField(
            model_name='post',
            name='user',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='notification',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='profiles.UserProfile'),
        ),
        migrations.AddField(
            model_name='comment',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author_comment', to='profiles.UserProfile'),
        ),
        migrations.AddField(
            model_name='comment',
            name='likes',
            field=models.ManyToManyField(blank=True, related_name='likes_comment', to='profiles.UserProfile'),
        ),
        migrations.AddField(
            model_name='comment',
            name='parent',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='profiles.Post'),
        ),
    ]
