# Generated by Django 6.0.6 on 2026-06-17 18:59

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AuditLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action', models.CharField(choices=[('create', 'Create'), ('update', 'Update'), ('delete', 'Delete'), ('status_change', 'Status Change'), ('assign', 'Assignment'), ('comment', 'Comment Added'), ('attachment', 'File Uploaded'), ('approval', 'Approval Action'), ('escalation', 'Escalation'), ('reopen', 'Ticket Reopened'), ('close', 'Ticket Closed'), ('sla_change', 'SLA Change'), ('ai_reply_used', 'AI Reply Used'), ('ai_reply_edited', 'AI Reply Edited'), ('login', 'Login'), ('logout', 'Logout'), ('export', 'Data Export')], max_length=30)),
                ('model_name', models.CharField(max_length=50)),
                ('object_id', models.CharField(blank=True, max_length=50)),
                ('object_repr', models.CharField(blank=True, max_length=200)),
                ('previous_value', models.JSONField(blank=True, null=True)),
                ('new_value', models.JSONField(blank=True, null=True)),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True)),
                ('user_agent', models.TextField(blank=True)),
                ('extra_data', models.JSONField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
