# Generated by Django 3.0.8 on 2020-07-06 21:11

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=256, verbose_name='Key')),
                ('name', models.CharField(max_length=100, verbose_name='Name')),
                ('joined', models.DateField(auto_now_add=True, verbose_name='Registration Date')),
                ('bio', models.CharField(max_length=4096, verbose_name='Bio')),
                ('score', models.IntegerField(default=0)),
                ('followers', models.ManyToManyField(related_name='_user_followers_+', to='phanhooapi.User')),
                ('following', models.ManyToManyField(related_name='_user_following_+', to='phanhooapi.User')),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=256, verbose_name='Key')),
                ('name', models.CharField(max_length=256, verbose_name='Name')),
                ('description', models.CharField(max_length=1024, verbose_name='Description')),
                ('created', models.DateField(auto_now_add=True, verbose_name='Registration Date')),
                ('score', models.IntegerField(default=0)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='room_author', to='phanhooapi.User')),
                ('followers', models.ManyToManyField(related_name='room_followers', to='phanhooapi.User')),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=256, verbose_name='Key')),
                ('title', models.CharField(max_length=240, verbose_name='Title')),
                ('created', models.DateField(auto_now_add=True, verbose_name='Registration Date')),
                ('upvotes', models.IntegerField(default=0)),
                ('downvotes', models.IntegerField(default=0)),
                ('score', models.IntegerField(default=0)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='phanhooapi.User')),
            ],
        ),
        migrations.CreateModel(
            name='Convo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=256, verbose_name='Key')),
                ('title', models.CharField(max_length=240, verbose_name='Title')),
                ('created', models.DateField(auto_now_add=True, verbose_name='Registration Date')),
                ('image', models.CharField(max_length=200, verbose_name='Image')),
                ('content', models.CharField(max_length=1024, verbose_name='Content')),
                ('score', models.IntegerField(default=0)),
                ('upvotes', models.IntegerField(default=0)),
                ('downvotes', models.IntegerField(default=0)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='convo_author', to='phanhooapi.User')),
                ('followers', models.ManyToManyField(related_name='convo_followers', to='phanhooapi.User')),
                ('posts', models.ManyToManyField(to='phanhooapi.Post')),
                ('rooms', models.ManyToManyField(to='phanhooapi.Room')),
            ],
        ),
    ]
