# Generated by Django 6.0.5 on 2026-05-10 16:07

import django.contrib.auth.models
import django.contrib.auth.validators
import django.db.models.deletion
import django.utils.timezone
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('asset_name', models.CharField(max_length=256)),
                ('asset_description', models.TextField(blank=True)),
                ('asset_doc_md', models.TextField(blank=True)),
                ('asset_system', models.CharField(blank=True, max_length=32)),
                ('asset_requirements', models.JSONField(blank=True, default=list)),
            ],
        ),
        migrations.CreateModel(
            name='ObjectTrait',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('trait_name', models.CharField(max_length=64)),
                ('trait_description', models.TextField(blank=True)),
                ('trait_system', models.CharField(blank=True, max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Pin',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(max_length=100)),
                ('url', models.URLField(max_length=300)),
                ('x', models.FloatField(help_text='X position as percentage (0-100)')),
                ('y', models.FloatField(help_text='Y position as percentage (0-100)')),
                ('pin_type', models.CharField(default='general', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Feature',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('feature_name', models.CharField(max_length=200)),
                ('feature_system', models.CharField(blank=True, max_length=36)),
                ('feature_description', models.TextField(blank=True)),
                ('feature_requirements', models.JSONField(blank=True, default=list)),
                ('feature_data', models.JSONField(blank=True, default=dict)),
                ('feature_traits', models.ManyToManyField(blank=True, related_name='features', to='main.objecttrait')),
            ],
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('package_name', models.CharField(max_length=200)),
                ('package_system', models.CharField(blank=True, max_length=36)),
                ('package_description', models.TextField(blank=True)),
                ('package_type', models.CharField(blank=True, max_length=100)),
                ('package_doc_md', models.TextField(blank=True)),
                ('package_requirements', models.JSONField(blank=True, default=list)),
                ('package_operations', models.JSONField(blank=True, default=dict)),
                ('package_traits', models.ManyToManyField(blank=True, related_name='packages', to='main.objecttrait')),
            ],
        ),
        migrations.CreateModel(
            name='Character',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('level', models.IntegerField(default=0)),
                ('alignment', models.CharField(blank=True, max_length=50)),
                ('size', models.CharField(blank=True, max_length=20)),
                ('age', models.IntegerField(default=0)),
                ('gender', models.CharField(blank=True, max_length=30)),
                ('height', models.CharField(blank=True, max_length=20)),
                ('weight', models.IntegerField(default=0)),
                ('deity', models.CharField(blank=True, max_length=100)),
                ('strength_base', models.IntegerField(default=0)),
                ('dexterity_base', models.IntegerField(default=0)),
                ('constitution_base', models.IntegerField(default=0)),
                ('intelligence_base', models.IntegerField(default=0)),
                ('wisdom_base', models.IntegerField(default=0)),
                ('charisma_base', models.IntegerField(default=0)),
                ('armor_base', models.IntegerField(default=0)),
                ('inspiration', models.BooleanField(default=False)),
                ('experience', models.IntegerField(default=0)),
                ('proficiencies_armor', models.JSONField(blank=True, default=list)),
                ('proficiencies_weapons', models.JSONField(blank=True, default=list)),
                ('proficiencies_tools', models.JSONField(blank=True, default=list)),
                ('languages', models.JSONField(blank=True, default=list)),
                ('strength_save_prof', models.BooleanField(default=False)),
                ('dexterity_save_prof', models.BooleanField(default=False)),
                ('constitution_save_prof', models.BooleanField(default=False)),
                ('intelligence_save_prof', models.BooleanField(default=False)),
                ('wisdom_save_prof', models.BooleanField(default=False)),
                ('charisma_save_prof', models.BooleanField(default=False)),
                ('hp', models.IntegerField(default=0)),
                ('hp_temp', models.IntegerField(default=0)),
                ('hit_die', models.CharField(blank=True, max_length=20)),
                ('deathsaves_successes', models.IntegerField(default=0)),
                ('deathsaves_failures', models.IntegerField(default=0)),
                ('fire_resistance', models.BooleanField(default=False)),
                ('poison_resistance', models.BooleanField(default=False)),
                ('psychic_resistance', models.BooleanField(default=False)),
                ('cold_resistance', models.BooleanField(default=False)),
                ('thunder_resistance', models.BooleanField(default=False)),
                ('acid_resistance', models.BooleanField(default=False)),
                ('force_resistance', models.BooleanField(default=False)),
                ('radiant_resistance', models.BooleanField(default=False)),
                ('necrotic_resistance', models.BooleanField(default=False)),
                ('bludgeoning_resistance', models.BooleanField(default=False)),
                ('piercing_resistance', models.BooleanField(default=False)),
                ('slashing_resistance', models.BooleanField(default=False)),
                ('immunities', models.JSONField(blank=True, default=list)),
                ('vulnerabilities', models.JSONField(blank=True, default=list)),
                ('speed_base', models.IntegerField(default=0)),
                ('speed_type', models.JSONField(blank=True, default=list)),
                ('darkvision', models.IntegerField(default=0)),
                ('blindsight', models.IntegerField(default=0)),
                ('tremorsense', models.IntegerField(default=0)),
                ('truesight', models.IntegerField(default=0)),
                ('spellcasting_ability', models.CharField(blank=True, max_length=50)),
                ('spell_save_dc', models.IntegerField(default=0)),
                ('spell_attack_bonus', models.IntegerField(default=0)),
                ('known_spells', models.JSONField(blank=True, default=list)),
                ('prepared_spells', models.JSONField(blank=True, default=list)),
                ('spell_slots', models.JSONField(blank=True, default=dict)),
                ('cantrips', models.JSONField(blank=True, default=list)),
                ('spellcasting_class', models.CharField(blank=True, max_length=100)),
                ('exhaustion_level', models.IntegerField(default=0)),
                ('conditions_active', models.JSONField(blank=True, default=list)),
                ('cp', models.IntegerField(default=0)),
                ('sp', models.IntegerField(default=0)),
                ('ep', models.IntegerField(default=0)),
                ('gp', models.IntegerField(default=0)),
                ('pp', models.IntegerField(default=0)),
                ('equipment', models.JSONField(blank=True, default=list)),
                ('traits', models.JSONField(blank=True, default=list)),
                ('personality_traits', models.JSONField(blank=True, default=list)),
                ('ideals', models.JSONField(blank=True, default=list)),
                ('bonds', models.JSONField(blank=True, default=list)),
                ('flaws', models.JSONField(blank=True, default=list)),
                ('notes', models.TextField(blank=True)),
                ('hp_features', models.JSONField(blank=True, default=list)),
                ('custom_attributes', models.JSONField(blank=True, default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='characters', to=settings.AUTH_USER_MODEL)),
                ('features', models.ManyToManyField(blank=True, related_name='characters', to='main.feature')),
                ('background', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='background_characters', to='main.package')),
                ('char_class', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='class_characters', to='main.package')),
                ('packages', models.ManyToManyField(blank=True, related_name='characters', to='main.package')),
                ('race', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='race_characters', to='main.package')),
                ('subclass', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subclass_characters', to='main.package')),
                ('subrace', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subrace_characters', to='main.package')),
            ],
        ),
        migrations.CreateModel(
            name='PackageFeature',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('priority', models.IntegerField(default=0)),
                ('requirements_override', models.JSONField(blank=True, null=True)),
                ('feature', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.feature')),
                ('package', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.package')),
            ],
            options={
                'ordering': ['priority'],
                'unique_together': {('package', 'feature')},
            },
        ),
        migrations.AddField(
            model_name='package',
            name='features',
            field=models.ManyToManyField(blank=True, related_name='packages', through='main.PackageFeature', to='main.feature'),
        ),
    ]
