# Generated by Django 4.2.27 on 2026-06-21 15:23

from django.conf import settings
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),
        ('resm', '0006_pg_trgm_index'),
    ]

    operations = [
        migrations.CreateModel(
            name='PaperMonitor',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, 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='删除标记')),
                ('type', models.CharField(choices=[('journal', '期刊(ISSN)'), ('search', '搜索词(标题/摘要)'), ('keyword', 'OpenAlex关键词ID')], db_index=True, max_length=20, verbose_name='监控类型')),
                ('value', models.CharField(max_length=500, verbose_name='监控值')),
                ('name', models.CharField(blank=True, max_length=200, null=True, verbose_name='名称')),
                ('note', models.CharField(blank=True, max_length=100, null=True, verbose_name='方向标注')),
                ('is_active', models.BooleanField(db_index=True, default=True, verbose_name='启用')),
                ('days', models.IntegerField(default=30, verbose_name='回看窗口(天)')),
                ('last_run', models.DateTimeField(blank=True, null=True, verbose_name='上次运行时间')),
                ('last_count', models.IntegerField(default=0, verbose_name='上次拉取篇数(窗口内)')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'verbose_name': '论文监控',
                'verbose_name_plural': '论文监控',
            },
        ),
    ]
