# Generated by Django 5.1.6 on 2025-03-05 00:52

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


class Migration(migrations.Migration):

    replaces = [('teamspeak3', '0001_initial'), ('teamspeak3', '0002_auto_20161212_0133'), ('teamspeak3', '0003_teamspeak3user'), ('teamspeak3', '0004_service_permissions'), ('teamspeak3', '0005_stategroup')]

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('authentication', '0025_v5squash'),
    ]

    operations = [
        migrations.CreateModel(
            name='TSgroup',
            fields=[
                ('ts_group_id', models.IntegerField(primary_key=True, serialize=False)),
                ('ts_group_name', models.CharField(max_length=30)),
            ],
            options={
                'verbose_name': 'TS Group',
            },
        ),
        migrations.CreateModel(
            name='UserTSgroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ts_group', models.ManyToManyField(to='teamspeak3.tsgroup')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'User TS Group',
            },
        ),
        migrations.CreateModel(
            name='AuthTS',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('auth_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.group')),
                ('ts_group', models.ManyToManyField(to='teamspeak3.tsgroup')),
            ],
            options={
                'verbose_name': 'Auth / TS Group',
            },
        ),
        migrations.CreateModel(
            name='Teamspeak3User',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='teamspeak3', serialize=False, to=settings.AUTH_USER_MODEL)),
                ('uid', models.CharField(max_length=254)),
                ('perm_key', models.CharField(max_length=254)),
            ],
            options={
                'default_permissions': (),
                'permissions': (('access_teamspeak3', 'Can access the Teamspeak3 service'),),
            },
        ),
        migrations.CreateModel(
            name='StateGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('state', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='authentication.state')),
                ('ts_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='teamspeak3.tsgroup')),
            ],
        ),
    ]
