# Generated by Django 4.2.21 on 2025-06-07 13:32

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import mojo.models.rest


class Migration(migrations.Migration):

    dependencies = [
        ('account', '0003_group_mojo_secrets_user_mojo_secrets'),
        ('fileman', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('incident', '0004_alter_incident_model_id'),
    ]

    operations = [
        migrations.CreateModel(
            name='IncidentHistory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('kind', models.CharField(blank=True, db_index=True, default=None, max_length=80, null=True)),
                ('state', models.IntegerField(default=0)),
                ('priority', models.IntegerField(default=0)),
                ('note', models.TextField(blank=True, default=None, null=True)),
                ('by', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('group', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='account.group')),
                ('media', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='fileman.file')),
                ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history', to='incident.incident')),
                ('to', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created'],
            },
            bases=(models.Model, mojo.models.rest.MojoModel),
        ),
    ]
