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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('drama', '0001_initial'),
        ('epic', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='LoginToken',
            fields=[
                ('email', models.EmailField(max_length=254)),
                ('uid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('username', models.CharField(blank=True, max_length=35, null=True, unique=True)),
                ('searchable', models.BooleanField(default=False)),
                ('palette', models.CharField(default='palette-default', max_length=32)),
                ('stripe_customer_id', models.CharField(blank=True, max_length=255, null=True)),
                ('ap_public_key', models.TextField(blank=True, default='')),
                ('ap_private_key', models.TextField(blank=True, default='')),
                ('sky_birth_dt', models.DateTimeField(blank=True, null=True)),
                ('sky_birth_lat', models.DecimalField(blank=True, decimal_places=4, max_digits=9, null=True)),
                ('sky_birth_lon', models.DecimalField(blank=True, decimal_places=4, max_digits=9, null=True)),
                ('sky_birth_place', models.CharField(blank=True, max_length=255)),
                ('sky_birth_tz', models.CharField(blank=True, max_length=64)),
                ('sky_house_system', models.CharField(blank=True, default='O', max_length=1)),
                ('sky_chart_data', models.JSONField(blank=True, null=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('active_title', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='drama.note')),
                ('equipped_deck', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='epic.deckvariant')),
                ('unlocked_decks', models.ManyToManyField(blank=True, related_name='unlocked_by', to='epic.deckvariant')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PaymentMethod',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stripe_pm_id', models.CharField(max_length=255)),
                ('last4', models.CharField(max_length=4)),
                ('brand', models.CharField(max_length=32)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_methods', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Token',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token_type', models.CharField(choices=[('coin', 'Coin-on-a-String'), ('Free', 'Free Token'), ('tithe', 'Tithe Token'), ('pass', 'Backstage Pass'), ('carte', 'Carte Blanche')], max_length=8)),
                ('expires_at', models.DateTimeField(blank=True, null=True)),
                ('next_ready_at', models.DateTimeField(blank=True, null=True)),
                ('slots_claimed', models.PositiveSmallIntegerField(blank=True, default=0)),
                ('current_room', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='coin_tokens', to='epic.room')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tokens', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='equipped_trinket',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='lyric.token'),
        ),
        migrations.CreateModel(
            name='Wallet',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('writs', models.IntegerField(default=0)),
                ('esteem', models.IntegerField(default=0)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='wallet', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
