# Generated by Django 6.0 on 2025-12-14 02:30

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='Feature',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('feature_name', models.CharField(max_length=200)),
                ('feature_description', models.TextField(blank=True)),
                ('feature_data', models.JSONField(blank=True, default=dict)),
            ],
        ),
        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_description', models.TextField(blank=True)),
                ('package_type', models.CharField(blank=True, max_length=100)),
                ('package_doc_md', models.TextField(blank=True)),
            ],
        ),
        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='Character',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('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)),
                ('strength', models.IntegerField(default=0)),
                ('dexterity', models.IntegerField(default=0)),
                ('constitution', models.IntegerField(default=0)),
                ('intelligence', models.IntegerField(default=0)),
                ('wisdom', models.IntegerField(default=0)),
                ('charisma', models.IntegerField(default=0)),
                ('armor', models.IntegerField(default=0)),
                ('strength_modifier', models.IntegerField(default=0)),
                ('dexterity_modifier', models.IntegerField(default=0)),
                ('constitution_modifier', models.IntegerField(default=0)),
                ('intelligence_modifier', models.IntegerField(default=0)),
                ('wisdom_modifier', models.IntegerField(default=0)),
                ('charisma_modifier', models.IntegerField(default=0)),
                ('proficiency', 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', models.IntegerField(default=0)),
                ('dexterity_save', models.IntegerField(default=0)),
                ('constitution_save', models.IntegerField(default=0)),
                ('intelligence_save', models.IntegerField(default=0)),
                ('wisdom_save', models.IntegerField(default=0)),
                ('charisma_save', models.IntegerField(default=0)),
                ('hp', models.IntegerField(default=0)),
                ('hp_max', models.IntegerField(default=0)),
                ('hp_temp', models.IntegerField(default=0)),
                ('hit_die', models.CharField(blank=True, max_length=20)),
                ('initiative', models.IntegerField(default=0)),
                ('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)),
                ('athletics', models.IntegerField(default=0)),
                ('acrobatics', models.IntegerField(default=0)),
                ('sleight_of_hand', models.IntegerField(default=0)),
                ('stealth', models.IntegerField(default=0)),
                ('arcana', models.IntegerField(default=0)),
                ('history', models.IntegerField(default=0)),
                ('investigation', models.IntegerField(default=0)),
                ('nature', models.IntegerField(default=0)),
                ('religion', models.IntegerField(default=0)),
                ('animal_handling', models.IntegerField(default=0)),
                ('insight', models.IntegerField(default=0)),
                ('medicine', models.IntegerField(default=0)),
                ('perception', models.IntegerField(default=0)),
                ('survival', models.IntegerField(default=0)),
                ('deception', models.IntegerField(default=0)),
                ('intimidation', models.IntegerField(default=0)),
                ('performance', models.IntegerField(default=0)),
                ('persuasion', models.IntegerField(default=0)),
                ('athletics_passive', models.IntegerField(default=0)),
                ('acrobatics_passive', models.IntegerField(default=0)),
                ('sleight_of_hand_passive', models.IntegerField(default=0)),
                ('stealth_passive', models.IntegerField(default=0)),
                ('arcana_passive', models.IntegerField(default=0)),
                ('history_passive', models.IntegerField(default=0)),
                ('investigation_passive', models.IntegerField(default=0)),
                ('nature_passive', models.IntegerField(default=0)),
                ('religion_passive', models.IntegerField(default=0)),
                ('animal_handling_passive', models.IntegerField(default=0)),
                ('insight_passive', models.IntegerField(default=0)),
                ('medicine_passive', models.IntegerField(default=0)),
                ('perception_passive', models.IntegerField(default=0)),
                ('survival_passive', models.IntegerField(default=0)),
                ('deception_passive', models.IntegerField(default=0)),
                ('intimidation_passive', models.IntegerField(default=0)),
                ('performance_passive', models.IntegerField(default=0)),
                ('persuasion_passive', models.IntegerField(default=0)),
                ('passive_perception', models.IntegerField(default=0)),
                ('passive_investigation', models.IntegerField(default=0)),
                ('passive_insight', 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)),
                ('features', 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)),
                ('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)),
                ('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)),
                ('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'),
        ),
    ]
