# Generated by Django 3.1.1 on 2020-11-30 14:19

import blog.validator
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='Blog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('subtitle', models.CharField(max_length=150)),
                ('blog_pic', models.ImageField(blank=True, upload_to='blogpics', validators=[blog.validator.validate_file_size])),
                ('blog_content', models.TextField(default='')),
                ('slug', models.SlugField(allow_unicode=True, default='', max_length=100)),
                ('views', models.IntegerField(default=0)),
                ('date_posted', models.DateTimeField(auto_now_add=True)),
                ('likes', models.ManyToManyField(blank=True, related_name='blog_likes', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PrivateMessage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('chat_id', models.IntegerField()),
                ('date_posted', models.DateTimeField(auto_now_add=True)),
                ('pmsg_file', models.FileField(blank=True, upload_to='private_message_files', validators=[blog.validator.validate_file_size])),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('funny', models.ManyToManyField(blank=True, related_name='pfunny', to=settings.AUTH_USER_MODEL)),
                ('like', models.ManyToManyField(blank=True, related_name='plikes', to=settings.AUTH_USER_MODEL)),
                ('love', models.ManyToManyField(blank=True, related_name='plove', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='NotifyMe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('notify_title', models.CharField(default='New Notification', max_length=100)),
                ('notify_alert', models.CharField(max_length=200)),
                ('read', models.BooleanField(default=False)),
                ('blog_slug', models.CharField(blank=True, max_length=100)),
                ('date_notified', models.DateTimeField(auto_now_add=True)),
                ('follower_sender', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='who_started_following', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('date_posted', models.DateTimeField(auto_now_add=True)),
                ('msg_file', models.FileField(blank=True, upload_to='message_files', validators=[blog.validator.validate_file_size])),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('funny', models.ManyToManyField(blank=True, related_name='funny', to=settings.AUTH_USER_MODEL)),
                ('like', models.ManyToManyField(blank=True, related_name='likes', to=settings.AUTH_USER_MODEL)),
                ('love', models.ManyToManyField(blank=True, related_name='love', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FeedBack',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('feedback', models.CharField(help_text='your suggestions are important,let us know. ', max_length=500)),
                ('date_posted', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField(default='...')),
                ('date_posted', models.DateTimeField(auto_now_add=True)),
                ('blog', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.blog')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Chatters',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('chatter_users', models.CharField(max_length=200)),
                ('private_chat_id', models.BigIntegerField()),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('receiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chatter2', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ChatRoom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room_name', models.CharField(max_length=150, unique=True)),
                ('about', models.CharField(blank=True, default='Team work is all we need', max_length=500)),
                ('room_logo', models.ImageField(blank=True, default='room.jpg', upload_to='room_pics', validators=[blog.validator.validate_file_size])),
                ('is_active', models.BooleanField(default=False)),
                ('allow_any', models.BooleanField(blank=True, default=False, help_text='allow any user to enter your room')),
                ('key', models.CharField(help_text='protect your room with a key', max_length=100)),
                ('slug', models.SlugField(default='', max_length=100)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('allowed_users', models.ManyToManyField(blank=True, related_name='allowed', to=settings.AUTH_USER_MODEL)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('pending_users', models.ManyToManyField(blank=True, related_name='pending', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
