# Generated by Django 5.2.9 on 2026-01-28 14:41

import django.db.models.deletion
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'),
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='GroupObjectPermission',
            fields=[
                ('object_pk', models.CharField(max_length=255, verbose_name='object ID')),
                ('id', models.BigAutoField(editable=False, primary_key=True, serialize=False, unique=True)),
                ('editable', models.BooleanField(default=True)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.group')),
                ('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.permission')),
            ],
            options={
                'abstract': False,
                'default_related_name': 'groupobjectpermissions',
                'indexes': [models.Index(fields=['content_type', 'object_pk'], name='wbcore_perm_content_7e5298_idx'), models.Index(fields=['content_type', 'object_pk', 'group'], name='wbcore_perm_content_e0e7e3_idx')],
                'unique_together': {('group', 'permission', 'object_pk')},
            },
        ),
        migrations.CreateModel(
            name='UserObjectPermission',
            fields=[
                ('object_pk', models.CharField(max_length=255, verbose_name='object ID')),
                ('id', models.BigAutoField(editable=False, primary_key=True, serialize=False, unique=True)),
                ('editable', models.BooleanField(default=True)),
                ('system', models.BooleanField(default=False)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.permission')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
                'default_related_name': 'userobjectpermissions',
                'indexes': [models.Index(fields=['content_type', 'object_pk'], name='wbcore_perm_content_753f13_idx'), models.Index(fields=['content_type', 'object_pk', 'user'], name='wbcore_perm_content_9efa9b_idx')],
                'unique_together': {('user', 'permission', 'object_pk')},
            },
        ),
    ]
