# Generated by Django 5.1.9 on 2025-05-16 09:58

import access.models.tenancy
import core.models.ticket_comment_base
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('access', '0010_company_alter_entity_entity_type_alter_person_dob_and_more'),
        ('core', '0022_ticketcommentbase_ticketbase_ticketcommentsolution_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='TicketCommentAction',
            fields=[
                ('ticketcommentbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.ticketcommentbase')),
            ],
            options={
                'verbose_name': 'Ticket Comment Action',
                'verbose_name_plural': 'Ticket Comment Actions',
                'ordering': ['id'],
                'permissions': [('import_ticketcommentaction', 'Can import ticket action comment.')],
                'sub_model_type': 'action',
            },
            bases=('core.ticketcommentbase',),
        ),
        migrations.AlterField(
            model_name='manufacturer',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='modelhistory',
            name='organization',
            field=models.ForeignKey(help_text='Tenant this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='modelnotes',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='notes',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='relatedtickets',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='ticket',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='ticketbase',
            name='opened_by',
            field=models.ForeignKey(blank=True, help_text='Who is the ticket for', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='ticket_opened', to=settings.AUTH_USER_MODEL, verbose_name='Opened By'),
        ),
        migrations.AlterField(
            model_name='ticketbase',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='ticketcategory',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='ticketcomment',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='ticketcommentbase',
            name='category',
            field=models.ForeignKey(blank=True, help_text='Category of the comment', null=True, on_delete=django.db.models.deletion.PROTECT, to='core.ticketcommentcategory', verbose_name='Category'),
        ),
        migrations.AlterField(
            model_name='ticketcommentbase',
            name='comment_type',
            field=models.CharField(choices=core.models.ticket_comment_base.TicketCommentBase.get_comment_type_choices, help_text='Type this comment is. derived from Meta.verbose_name', max_length=30, validators=[core.models.ticket_comment_base.TicketCommentBase.field_validation_not_empty], verbose_name='Type'),
        ),
        migrations.AlterField(
            model_name='ticketcommentbase',
            name='external_ref',
            field=models.IntegerField(blank=True, help_text='External System reference', null=True, verbose_name='Reference Number'),
        ),
        migrations.AlterField(
            model_name='ticketcommentbase',
            name='external_system',
            field=models.IntegerField(blank=True, choices=[(1, 'Github'), (2, 'Gitlab'), (9999, 'Custom #1 (Imported)'), (9998, 'Custom #2 (Imported)'), (9997, 'Custom #3 (Imported)'), (9996, 'Custom #4 (Imported)'), (9995, 'Custom #5 (Imported)'), (9994, 'Custom #6 (Imported)'), (9993, 'Custom #7 (Imported)'), (9992, 'Custom #8 (Imported)'), (9991, 'Custom #9 (Imported)')], help_text='External system this item derives', null=True, verbose_name='External System'),
        ),
        migrations.AlterField(
            model_name='ticketcommentbase',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='ticketcommentbase',
            name='parent',
            field=models.ForeignKey(blank=True, help_text='Parent ID for creating discussion threads', null=True, on_delete=django.db.models.deletion.PROTECT, to='core.ticketcommentbase', verbose_name='Parent Comment'),
        ),
        migrations.AlterField(
            model_name='ticketcommentcategory',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='ticketlinkeditem',
            name='item_type',
            field=models.IntegerField(choices=[(1, 'Cluster'), (2, 'Config Group'), (3, 'Device'), (4, 'Operating System'), (5, 'Service'), (6, 'Software'), (7, 'Knowledge Base'), (8, 'Tenant'), (9, 'Team'), (10, 'Feature Flag'), (11, 'Software Version'), (12, 'Ticket Category'), (13, 'Ticket Comment Category'), (14, 'Project State'), (15, 'Git Repository'), (16, 'Entity'), (17, 'Role'), (18, 'Asset'), (19, 'IT Asset')], help_text='Python Model location for linked item', verbose_name='Item Type'),
        ),
        migrations.AlterField(
            model_name='ticketlinkeditem',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
    ]
