# Generated by Django 3.2.13 on 2024-12-27 15:34

from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0043_auto_20241227_1534'),
        ('auth', '0012_alter_user_first_name_max_length'),
        ('ticket', '0003_messagesupport_ticketsupport'),
    ]

    operations = [
        migrations.RenameField(
            model_name='ticketsupport',
            old_name='type',
            new_name='last_message',
        ),
        migrations.RemoveField(
            model_name='messagesupport',
            name='user_location',
        ),
        migrations.RemoveField(
            model_name='ticketsupport',
            name='ticket_id',
        ),
        migrations.AddField(
            model_name='messagesupport',
            name='last_seen',
            field=models.DateTimeField(null=True),
        ),
        migrations.AddField(
            model_name='messagesupport',
            name='send_message',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='ticketsupport',
            name='parent',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='ticket.ticketsupport'),
        ),
        migrations.AddField(
            model_name='ticketsupport',
            name='read_only',
            field=models.BooleanField(default=True),
        ),
        migrations.AddField(
            model_name='ticketsupport',
            name='role',
            field=models.CharField(max_length=100, null=True),
        ),
        migrations.AddField(
            model_name='ticketsupport',
            name='to_role',
            field=models.ManyToManyField(related_name='to_role_ticket', to='auth.Group'),
        ),
        migrations.AddField(
            model_name='ticketsupport',
            name='to_user',
            field=models.ManyToManyField(related_name='to_user_ticket', to='authentication.SystemUserProfile'),
        ),
        migrations.AddField(
            model_name='ticketsupport',
            name='type_ticket',
            field=models.CharField(default='single', max_length=100),
        ),
        migrations.AlterField(
            model_name='answer',
            name='key',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
        migrations.AlterField(
            model_name='question',
            name='key',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
        migrations.AlterField(
            model_name='supportunit',
            name='key',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
        migrations.AlterField(
            model_name='ticket',
            name='key',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
        migrations.AlterField(
            model_name='ticketcontent',
            name='key',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
        migrations.AlterField(
            model_name='ticketsupport',
            name='key',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
        migrations.CreateModel(
            name='TicketPermission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(max_length=200, null=True)),
                ('roles', models.ManyToManyField(related_name='to_role', to='auth.Group')),
            ],
        ),
    ]
