# Generated by Django 2.2.6 on 2019-11-13 23:31

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('eventDateTime', models.DateTimeField()),
                ('location', models.CharField(default='The Basement', max_length=200)),
                ('event_state', models.CharField(choices=[('PV', 'Event Setup Phase'), ('VO', 'Voting Phase'), ('AV', 'Post-Voting Phase')], default='PV', max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gameName', models.CharField(default='', max_length=50)),
                ('playerMin', models.IntegerField()),
                ('playerMax', models.IntegerField()),
                ('genre', models.CharField(default='', max_length=50)),
                ('thumbnail_url', models.CharField(default='', max_length=100)),
                ('description', models.CharField(default='', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('friends', models.ManyToManyField(related_name='_profile_friends_+', to='database.Profile')),
                ('library', models.ManyToManyField(to='database.Game')),
            ],
        ),
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rank', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(3), django.core.validators.MinValueValidator(1)])),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='database.Event')),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Game')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='database.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.CharField(default='', max_length=200)),
                ('link', models.CharField(default='', max_length=100)),
                ('recipient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to='database.Profile')),
            ],
        ),
        migrations.AddField(
            model_name='event',
            name='attendees',
            field=models.ManyToManyField(related_name='events_attending', to='database.Profile'),
        ),
        migrations.AddField(
            model_name='event',
            name='eventGames',
            field=models.ManyToManyField(to='database.Game'),
        ),
        migrations.AddField(
            model_name='event',
            name='host',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events_hosting', to='database.Profile'),
        ),
        migrations.AddField(
            model_name='event',
            name='pendingPlayers',
            field=models.ManyToManyField(related_name='events_invited', to='database.Profile'),
        ),
    ]
