# Generated by Django 3.2.12 on 2022-08-15 06:02

from django.db import migrations, models
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='DrfRequestLog',
            fields=[
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('requested_at', models.DateTimeField(db_index=True)),
                ('response_ms', models.PositiveIntegerField(default=0)),
                ('path', models.CharField(db_index=True, help_text='请求地址', max_length=400)),
                ('view', models.CharField(blank=True, db_index=True, help_text='执行视图', max_length=400, null=True)),
                ('view_method', models.CharField(blank=True, db_index=True, max_length=20, null=True)),
                ('remote_addr', models.GenericIPAddressField()),
                ('host', models.URLField()),
                ('method', models.CharField(max_length=10)),
                ('query_params', models.TextField(blank=True, null=True)),
                ('data', models.TextField(blank=True, null=True)),
                ('response', models.TextField(blank=True, null=True)),
                ('errors', models.TextField(blank=True, null=True)),
                ('agent', models.TextField(blank=True, null=True)),
                ('status_code', models.PositiveIntegerField(blank=True, db_index=True, null=True)),
            ],
            options={
                'verbose_name': 'DRF请求日志',
            },
        ),
    ]
