Jelajahi Sumber

增加字段admin_id

guhongwei 3 tahun lalu
induk
melakukan
2e7a12997b
2 mengubah file dengan 9 tambahan dan 0 penghapusan
  1. 6 0
      app/controller/patent/.patentapply.js
  2. 3 0
      app/model/patent/patentapply.js

+ 6 - 0
app/controller/patent/.patentapply.js

@@ -5,6 +5,8 @@ module.exports = {
       "user_name",
       "mech_id",
       "mech_name",
+      "admin_id",
+      "admin_name",
       "agentmech_id",
       "agentmech_name",
       "create_number",
@@ -32,6 +34,8 @@ module.exports = {
       "user_name",
       "mech_id",
       "mech_name",
+      "admin_id",
+      "admin_name",
       "agentmech_id",
       "agentmech_name",
       "create_number",
@@ -61,6 +65,8 @@ module.exports = {
         user_name: "%user_name%",
         mech_id: "mech_id",
         mechanism_name: "%mech_name%",
+        admin_id: "admin_id",
+        admin_name: "%admin_name%",
         agentmech_id: "agentmech_id",
         agentmech_name: "%agentmech_name%",
         create_number: "%create_number%",

+ 3 - 0
app/model/patent/patentapply.js

@@ -9,6 +9,8 @@ const patentapply = {
   user_name: { type: String }, // 用户姓名
   mech_id: { type: ObjectId }, // 机构id
   mech_name: { type: String }, // 机构名称
+  admin_id: { type: ObjectId }, // 管理员id
+  admin_name: { type: String }, // 管理员姓名
   agentmech_id: { type: ObjectId }, // 代理机构id
   agentmech_name: { type: String }, // 代理机构姓名
   create_number: { type: String }, // 申请号
@@ -30,6 +32,7 @@ const schema = new Schema(patentapply, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
 schema.index({ user_id: 1 });
 schema.index({ mech_id: 1 });
+schema.index({ admin_id: 1 });
 schema.index({ agentmech_id: 1 });
 schema.index({ create_number: 1 });
 schema.index({ name: 1 });