ruifeng_liu 3 gadi atpakaļ
vecāks
revīzija
bdef9973d4
1 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  1. 7 4
      app/model/patent/patentinfo.js

+ 7 - 4
app/model/patent/patentinfo.js

@@ -4,10 +4,13 @@ const moment = require('moment');
 const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 const { ObjectId } = require('mongoose').Types;
 const { ObjectId } = require('mongoose').Types;
 
 
-const user = {
-  id: { type: ObjectId, required: false, maxLength: 500 }, // 名称,
-  name: { type: String, required: false, maxLength: 500 }, // 链接地址,
-};
+const user = new Schema(
+  {
+    id: { type: ObjectId, required: false, maxLength: 500 }, // 名称,
+    name: { type: String, required: false, maxLength: 500 }, // 链接地址,
+  },
+  { _id: false }
+);
 
 
 // 专利信息表
 // 专利信息表
 const patentinfo = {
 const patentinfo = {