# Generated by Django 3.2.12 on 2023-12-07 01:35

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('monitor', '0003_alter_drfrequestlog_view_method'),
    ]

    operations = [
        migrations.CreateModel(
            name='AuditLog',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('action', models.CharField(max_length=20, verbose_name='动作')),
                ('model_name', models.CharField(max_length=20, verbose_name='模型名')),
                ('instance_id', models.CharField(editable=False, max_length=20, verbose_name='记录ID')),
                ('change_reason', models.CharField(default='', max_length=50, verbose_name='变更原因')),
                ('change_time', models.DateTimeField(verbose_name='变更时间')),
                ('val_new', models.JSONField(default=dict, verbose_name='变更后完整数据')),
                ('difference', models.JSONField(default=list, verbose_name='变更情况')),
                ('change_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='操作人')),
            ],
        ),
    ]
