diff --git a/apps/ofm/services.py b/apps/ofm/services.py index 3ed56207..48ca1fa3 100644 --- a/apps/ofm/services.py +++ b/apps/ofm/services.py @@ -1,7 +1,7 @@ from apps.wf.models import Ticket # TicketFlow, Transition, Workflow, CustomField, State, -from apps.ofm.models import LendingSeal, Vehicle, BorrowRecord, Publicity, MroomBooking, MroomSlot, PatentInfo, Papersecret +from apps.ofm.models import LendingSeal, Vehicle, BorrowRecord, Publicity, MroomBooking, MroomSlot from rest_framework.exceptions import ParseError diff --git a/apps/srm/migrations/0002_patentrecord_pc_type.py b/apps/srm/migrations/0002_patentrecord_pc_type.py new file mode 100644 index 00000000..103fb1de --- /dev/null +++ b/apps/srm/migrations/0002_patentrecord_pc_type.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2025-11-03 05:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('srm', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='patentrecord', + name='pc_type', + field=models.CharField(choices=[('invention', '发明专利'), ('utility', '实用新型专利'), ('design', '外观设计专利')], default='invention', max_length=50, verbose_name='专利类型'), + ), + ] diff --git a/apps/srm/models.py b/apps/srm/models.py index 7ab14e00..45ec807a 100644 --- a/apps/srm/models.py +++ b/apps/srm/models.py @@ -46,9 +46,15 @@ class Papersecret(CommonBDModel): class PatentRecord(CommonADModel): """TN: 专利台账登记""" + PATENT_TYPE_CHOICES = ( + ('invention', '发明专利'), + ('utility', '实用新型专利'), + ('design', '外观设计专利'), + ) volume_number = models.CharField(max_length=50, null=True, blank=True, verbose_name="卷号") application_number = models.CharField(max_length=50, verbose_name="申请号(交局后补登)") patent = models.ForeignKey('PatentInfo', verbose_name="专利名称", on_delete=models.CASCADE, related_name='patent_record') + pc_type = models.CharField('专利类型', max_length=50, choices=PATENT_TYPE_CHOICES, default='invention') organization = models.CharField(max_length=100, verbose_name="单位") inventors = models.CharField(max_length=255, verbose_name="发明人") agent = models.CharField(max_length=255, null=True, blank=True, verbose_name="代理人")