# Generated by Django 6.0 on 2026-04-28 00:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('epic', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='gateslot',
            name='funded_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='funded_slots', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='gateslot',
            name='gamer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gate_slots', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='room',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owned_rooms', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='gateslot',
            name='room',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gate_slots', to='epic.room'),
        ),
        migrations.AddField(
            model_name='roominvite',
            name='inviter',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sent_invites', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='roominvite',
            name='room',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invites', to='epic.room'),
        ),
        migrations.AddField(
            model_name='sigreservation',
            name='gamer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sig_reservations', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='sigreservation',
            name='room',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sig_reservations', to='epic.room'),
        ),
        migrations.AddField(
            model_name='tableseat',
            name='gamer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='table_seats', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='tableseat',
            name='room',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='table_seats', to='epic.room'),
        ),
        migrations.AddField(
            model_name='sigreservation',
            name='seat',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sig_reservation', to='epic.tableseat'),
        ),
        migrations.AddField(
            model_name='character',
            name='seat',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='characters', to='epic.tableseat'),
        ),
        migrations.AddField(
            model_name='tarotcard',
            name='deck_variant',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cards', to='epic.deckvariant'),
        ),
        migrations.AddField(
            model_name='tableseat',
            name='significator',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='significator_seats', to='epic.tarotcard'),
        ),
        migrations.AddField(
            model_name='sigreservation',
            name='card',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sig_reservations', to='epic.tarotcard'),
        ),
        migrations.AddField(
            model_name='character',
            name='significator',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='character_significators', to='epic.tarotcard'),
        ),
        migrations.AddField(
            model_name='tarotdeck',
            name='deck_variant',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='active_decks', to='epic.deckvariant'),
        ),
        migrations.AddField(
            model_name='tarotdeck',
            name='room',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='tarot_deck', to='epic.room'),
        ),
        migrations.AlterUniqueTogether(
            name='tarotcard',
            unique_together={('deck_variant', 'slug')},
        ),
        migrations.AddConstraint(
            model_name='sigreservation',
            constraint=models.UniqueConstraint(fields=('room', 'gamer'), name='one_sig_reservation_per_gamer_per_room'),
        ),
        migrations.AddConstraint(
            model_name='sigreservation',
            constraint=models.UniqueConstraint(fields=('room', 'card', 'polarity'), name='one_reservation_per_card_per_polarity_per_room'),
        ),
    ]
