# Generated by Django 3.1.4 on 2020-12-25 19:28

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='Club',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_time', models.DateTimeField()),
                ('name', models.CharField(max_length=128)),
                ('allow_non_members', models.BooleanField(default=False)),
                ('allow_anonymous_users', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='GameEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField()),
                ('game_id', models.IntegerField()),
                ('game_name', models.CharField(max_length=128)),
                ('emitter_user_id', models.IntegerField()),
                ('emitter_user_username', models.CharField(max_length=150)),
                ('recipient_user_id', models.IntegerField()),
                ('recipient_user_username', models.CharField(max_length=150)),
                ('type', models.CharField(max_length=64)),
                ('content', models.JSONField()),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_time', models.DateTimeField()),
                ('name', models.CharField(max_length=128)),
                ('config', models.JSONField()),
                ('state', models.JSONField()),
                ('club', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='brompoker.club')),
            ],
        ),
        migrations.CreateModel(
            name='ClubMembership',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_time', models.DateTimeField()),
                ('admin', models.BooleanField(default=False)),
                ('allow_play_games', models.BooleanField(default=False)),
                ('allow_manage_games', models.BooleanField(default=False)),
                ('allow_create_games', models.BooleanField(default=False)),
                ('allow_invite_members', models.BooleanField(default=False)),
                ('club', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='brompoker.club')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
