# Generated by Django 5.2.11 on 2026-03-11 02:48

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


class Migration(migrations.Migration):

    dependencies = [
        ('eveonline', '0019_v5squash'),
        ('mumble', '0015_v5squash'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='IdlerHandler',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Name')),
                ('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
                ('seconds', models.SmallIntegerField(default=3600, verbose_name='Idle Seconds')),
                ('interval', models.SmallIntegerField(default=60, verbose_name='Run Interval')),
                ('channel', models.SmallIntegerField(verbose_name='AFK Channel')),
                ('denylist', models.BooleanField(default=True, help_text='True for DenyList, False for Allowlist', verbose_name='DenyList')),
                ('list', models.CharField(default='', max_length=50, verbose_name='Allow/Deny list')),
            ],
            options={
                'verbose_name': 'Idler Handler',
                'verbose_name_plural': 'Idler Handlers',
                'default_permissions': (),
            },
        ),
        migrations.AlterModelOptions(
            name='mumbleuser',
            options={'permissions': (('access_mumble', 'Can access the Mumble service'), ('view_connection_history', 'Can access the connection history of the Mumble service')), 'verbose_name': 'User', 'verbose_name_plural': 'Users'},
        ),
        migrations.RemoveField(
            model_name='mumbleuser',
            name='display_name',
        ),
        migrations.RemoveField(
            model_name='mumbleuser',
            name='groups',
        ),
        migrations.AlterField(
            model_name='mumbleuser',
            name='certhash',
            field=models.CharField(blank=True, editable=False, help_text='Hash of Mumble client certificate as presented when user authenticates', max_length=254, null=True, verbose_name='Certificate Hash'),
        ),
        migrations.AlterField(
            model_name='mumbleuser',
            name='hashfn',
            field=models.CharField(choices=[('bcrypt-sha256', 'SHA256'), ('sha1', 'SHA1')], default='bcrypt-sha256', max_length=15),
        ),
        migrations.AlterField(
            model_name='mumbleuser',
            name='last_connect',
            field=models.DateTimeField(blank=True, editable=False, help_text='Timestamp of the users Last Connection to Mumble', null=True, verbose_name='Last Connection'),
        ),
        migrations.AlterField(
            model_name='mumbleuser',
            name='last_disconnect',
            field=models.DateTimeField(blank=True, editable=False, help_text='Timestamp of the users Last Disconnection from Mumble', null=True, verbose_name='Last Disconnection'),
        ),
        migrations.AlterField(
            model_name='mumbleuser',
            name='release',
            field=models.TextField(blank=True, editable=False, help_text='Client release. For official releases, this equals the version. For snapshots and git compiles, this will be something else.', null=True, verbose_name='Mumble Release'),
        ),
        migrations.AlterField(
            model_name='mumbleuser',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='%(app_label)s', serialize=False, to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='MumbleServerServer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('ip', models.GenericIPAddressField(default='127.0.0.1', verbose_name='Host IP Address')),
                ('endpoint', models.GenericIPAddressField(default='127.0.0.1', verbose_name='Endpoint IP Address')),
                ('port', models.PositiveSmallIntegerField(default=6502, verbose_name='Port')),
                ('secret', models.CharField(max_length=50, verbose_name='ICE Secret')),
                ('watchdog', models.SmallIntegerField(default=30, verbose_name='Watchdog Interval')),
                ('slice', models.CharField(choices=[('MumbleServer_1_6_870.ice', 'MumbleServer.ice (Mumble-Server 1.6.870)'), ('MumbleServer_1_5_857.ice', 'MumbleServer.ice (Mumble-Server 1.5.857)'), ('Murmur_1_4_287.ice', 'Murmur.ice (Murmur 1.4.287)'), ('Murmur_1_4_274.ice', 'Murmur.ice (Murmur 1.4.274)'), ('Murmur_1_3_4.ice', 'Murmur.ice (Murmur 1.3.4)')], default='MumbleServer_1_6_870.ice', max_length=32)),
                ('virtual_servers', models.CharField(default='1', max_length=50, verbose_name='Virtual Servers')),
                ('avatar_enable', models.BooleanField(default=True, verbose_name='Enable EVE Avatars')),
                ('reject_on_error', models.BooleanField(default=True, verbose_name='Reject Unauthenticated')),
                ('offset', models.IntegerField(default=1000000000, verbose_name='ID Offset')),
                ('idler_handler', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='mumble.idlerhandler', verbose_name='Idler Handler')),
            ],
            options={
                'verbose_name': 'Mumble Server',
                'verbose_name_plural': 'Mumble Servers',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='TempLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('expires', models.DateTimeField(verbose_name='Expiry')),
                ('link_ref', models.CharField(max_length=20)),
                ('creator', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='eveonline.evecharacter')),
            ],
            options={
                'permissions': (('create_new_links', 'Can Create Temp Links'),),
            },
        ),
        migrations.CreateModel(
            name='TempUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=254, unique=True)),
                ('pwhash', models.CharField(max_length=90)),
                ('hashfn', models.CharField(choices=[('bcrypt-sha256', 'SHA256'), ('sha1', 'SHA1')], default='bcrypt-sha256', max_length=15)),
                ('certhash', models.CharField(blank=True, editable=False, help_text='Hash of Mumble client certificate as presented when user authenticates', max_length=254, null=True, verbose_name='Certificate Hash')),
                ('release', models.TextField(blank=True, editable=False, help_text='Client release. For official releases, this equals the version. For snapshots and git compiles, this will be something else.', null=True, verbose_name='Mumble Release')),
                ('version', models.IntegerField(blank=True, editable=False, help_text='Client version. Major version in upper 16 bits, followed by 8 bits of minor version and 8 bits of patchlevel. Version 1.2.3 = 0x010203.', null=True, verbose_name='Mumble Version')),
                ('last_connect', models.DateTimeField(blank=True, editable=False, help_text='Timestamp of the users Last Connection to Mumble', null=True, verbose_name='Last Connection')),
                ('last_disconnect', models.DateTimeField(blank=True, editable=False, help_text='Timestamp of the users Last Disconnection from Mumble', null=True, verbose_name='Last Disconnection')),
                ('expires', models.DateTimeField(verbose_name='Expiry')),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eveonline.evecharacter', verbose_name='Character')),
                ('templink', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='mumble.templink')),
            ],
            options={
                'verbose_name': 'Temp User',
                'verbose_name_plural': 'Temp Users',
                'permissions': (),
            },
        ),
    ]
