feat: srm 修改models

This commit is contained in:
TianyangZhang 2025-11-03 13:55:41 +08:00
parent 9f301af038
commit 303cd94e35
3 changed files with 25 additions and 1 deletions

View File

@ -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

View File

@ -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='专利类型'),
),
]

View File

@ -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="代理人")