guhongwei 3 年之前
父節點
當前提交
72c190144e
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 3 0
      app/controller/patent/.patenttrans.js
  2. 2 0
      app/model/patent/patenttrans.js

+ 3 - 0
app/controller/patent/.patenttrans.js

@@ -3,6 +3,7 @@ module.exports = {
     requestBody: [
       "user_id",
       "patent_id",
+      "create_number",
       "patent_name",
       "contact",
       "phone",
@@ -27,6 +28,7 @@ module.exports = {
     requestBody: [
       "user_id",
       "patent_id",
+      "create_number",
       "patent_name",
       "contact",
       "phone",
@@ -52,6 +54,7 @@ module.exports = {
     parameters: {
       query: {
         patent_id: "patent_id",
+        create_number: "create_number",
         patent_name: "patent_name",
         contact: "contact",
         phone: "phone",

+ 2 - 0
app/model/patent/patenttrans.js

@@ -7,6 +7,7 @@ const { ObjectId } = require('mongoose').Types;
 const patenttrans = {
   user_id: { type: ObjectId },
   patent_id: { type: ObjectId }, // 专利id
+  create_number: { type: String }, // 专利号
   patent_name: { type: String }, // 专利名
   contact: { type: String }, // 联系人
   phone: { type: String }, // 联系电话
@@ -24,6 +25,7 @@ const patenttrans = {
 const schema = new Schema(patenttrans, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ patent_id: 1 });
+schema.index({ create_number: 1 });
 schema.index({ patent_name: 1 });
 schema.index({ contact: 1 });
 schema.index({ phone: 1 });