# Generated by Django 6.0.4 on 2026-06-17 05:00

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


class Migration(migrations.Migration):

    dependencies = [
        ('administrations', '0006_paymentrequest_payment_req_status_65728f_idx_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='HelpdeskTicket',
            fields=[
                ('id', models.UUIDField(default=apps.administrations.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('ticket_number', models.CharField(blank=True, max_length=20, unique=True)),
                ('subject', models.CharField(max_length=255)),
                ('category', models.CharField(blank=True, max_length=50)),
                ('department', models.CharField(blank=True, max_length=100)),
                ('description', models.TextField()),
                ('priority', models.CharField(choices=[('low', 'Low'), ('medium', 'Medium'), ('high', 'High'), ('urgent', 'Urgent')], default='medium', max_length=20)),
                ('status', models.CharField(choices=[('open', 'Open'), ('in_progress', 'In Progress'), ('resolved', 'Resolved'), ('closed', 'Closed')], default='open', max_length=20)),
                ('resolution', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('assigned_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assigned_helpdesk_tickets', to=settings.AUTH_USER_MODEL)),
                ('requester', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='helpdesk_tickets', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'helpdesk_tickets',
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['status'], name='helpdesk_ti_status_8e2b7d_idx')],
            },
        ),
    ]
