# Generated by Django 3.0.11 on 2020-12-31 07:59

from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('ability', '0017_auto_20201230_1626'),
    ]

    operations = [
        migrations.CreateModel(
            name='QueryRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('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='删除标记')),
                ('path', models.CharField(max_length=200, verbose_name='访问地址')),
                ('ip', models.CharField(max_length=200, verbose_name='IP地址')),
                ('method', models.CharField(default='GET', max_length=100, verbose_name='方法')),
                ('query', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
                ('search', models.TextField(blank=True, null=True, verbose_name='搜索字符')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='record_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '查询记录',
                'verbose_name_plural': '查询记录',
            },
        ),
    ]
