# Generated by Django 3.2.12 on 2025-11-03 01:39

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('system', '0006_auto_20241213_1249'),
        ('wf', '0004_workflow_view_path2'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='PatentInfo',
            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='删除标记')),
                ('name', models.CharField(max_length=100, verbose_name='拟申请专利名称')),
                ('author', models.CharField(max_length=100, verbose_name='发明人（设计人）')),
                ('type', models.CharField(choices=[('invention', '发明专利'), ('utility', '实用新型专利'), ('design', '外观设计专利')], default='invention', max_length=50, verbose_name='专利类型')),
                ('is_public', models.BooleanField(default=False, verbose_name='是否公开')),
                ('area', models.CharField(choices=[('Domestic', '国内申请'), ('Foreign', '国外申请'), ('PCT', 'PCT申请')], default='Domestic', max_length=50, verbose_name='拟申请地域')),
                ('other_area', models.CharField(blank=True, max_length=50, null=True, verbose_name='其它申请地域')),
                ('tech_status', models.JSONField(blank=True, default=list, help_text='技术状态信息列表，每个条目包含name(名称)、status(状态)、file(文件)字段', verbose_name='技术状态')),
                ('tech_file', models.JSONField(default=list, help_text='技术文件信息列表，每个条目包含name(名称)page(页数)字段', verbose_name='技术文件')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patentinfo_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patentinfo_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('ticket', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patentInfo_ticket', to='wf.ticket', verbose_name='关联工单')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patentinfo_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PatentRecord',
            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='删除标记')),
                ('volume_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='卷号')),
                ('application_number', models.CharField(max_length=50, verbose_name='申请号（交局后补登）')),
                ('organization', models.CharField(max_length=100, verbose_name='单位')),
                ('inventors', models.CharField(max_length=255, verbose_name='发明人')),
                ('agent', models.CharField(blank=True, max_length=255, null=True, verbose_name='代理人')),
                ('affiliated_platforms', models.CharField(blank=True, max_length=255, verbose_name='归属平台')),
                ('affiliated_projects', models.CharField(blank=True, max_length=255, verbose_name='归属项目')),
                ('application_date', models.DateField(blank=True, null=True, verbose_name='申请日')),
                ('authorization_date', models.DateField(blank=True, null=True, verbose_name='授权日')),
                ('validity_years', models.IntegerField(blank=True, null=True, verbose_name='有效年限（年）')),
                ('annuity_paid', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='年费缴纳')),
                ('status', models.CharField(choices=[('not_disclosed', '未公开'), ('under_examination', '实审中'), ('first_office_action', '一通'), ('second_office_action', '二通'), ('rejected', '驳回'), ('reexamination', '复审'), ('authorized', '授权')], max_length=20, verbose_name='状态')),
                ('award_info', models.TextField(blank=True, null=True, verbose_name='报奖情况')),
                ('bonus_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='奖金金额（元）')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patentrecord_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('patent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='patent_record', to='srm.patentinfo', verbose_name='专利名称')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patentrecord_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Papersecret',
            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='删除标记')),
                ('paper_name', models.CharField(max_length=100, verbose_name='拟发表论文名称')),
                ('publication_name', models.CharField(max_length=100, verbose_name='拟投期刊名称')),
                ('author', models.CharField(max_length=100, verbose_name='作者')),
                ('paper_type', models.CharField(max_length=100, verbose_name='拟发表文章类型')),
                ('is_chinese_core', models.BooleanField(default=False, verbose_name='是否为中文核心')),
                ('is_sci', models.BooleanField(default=False, verbose_name='是否被SCI/EI收录')),
                ('tech_status', models.JSONField(blank=True, default=list, help_text='技术状态信息列表，每个条目包含name(名称)、status(状态)、file(文件)字段', verbose_name='技术状态')),
                ('tech_file', models.JSONField(default=list, help_text='技术文件信息列表，每个条目包含name(名称)page(页数)字段', verbose_name='技术文件')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='papersecret_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='papersecret_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('ticket', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='paperse_ticket', to='wf.ticket', verbose_name='关联工单')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='papersecret_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
