lrf402788946 4 years ago
parent
commit
c45ee5f938
2 changed files with 14 additions and 15 deletions
  1. 14 14
      app/model/patent.js
  2. 0 1
      app/service/dock/patent.js

+ 14 - 14
app/model/patent.js

@@ -3,21 +3,21 @@ const Schema = require('mongoose').Schema;
 const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 // 专利表
 const PatentSchema = {
-  create_number: { type: String, required: false, maxLength: 500 }, // 申请号
-  create_date: { type: String, required: false, maxLength: 500 }, // 申请日
-  success_number: { type: String, required: false, maxLength: 500 }, // 公开(公告)号
-  success_date: { type: String, required: false, maxLength: 500 }, //  公开(公告)日
-  name: { type: String, required: false, maxLength: 500 }, // 标题
-  inventor: { type: String, required: false, maxLength: 500 }, // 发明人
-  address: { type: String, required: false, maxLength: 500 }, // 发明人地址
-  apply_personal: { type: String, required: false, maxLength: 500 }, // 申请人
-  term: { type: String, required: false, maxLength: 500 }, // 专利有效性
-  type: { type: String, required: false, maxLength: 500 }, // 专利类型
-  agent_personal: { type: String, required: false, maxLength: 500 }, // 代理人
-  agent: { type: String, required: false, maxLength: 500 }, // 代理机构
-  abstract: { type: String, required: false, maxLength: 1000 }, // 摘要
+  create_number: { type: String, required: false }, // 申请号
+  create_date: { type: String, required: false }, // 申请日
+  success_number: { type: String, required: false }, // 公开(公告)号
+  success_date: { type: String, required: false }, //  公开(公告)日
+  name: { type: String, required: false }, // 标题
+  inventor: { type: String, required: false }, // 发明人
+  address: { type: String, required: false }, // 发明人地址
+  apply_personal: { type: String, required: false }, // 申请人
+  term: { type: String, required: false }, // 专利有效性
+  type: { type: String, required: false }, // 专利类型
+  agent_personal: { type: String, required: false }, // 代理人
+  agent: { type: String, required: false }, // 代理机构
+  abstract: { type: String, required: false }, // 摘要
   img_url: { type: String, required: false }, // 图片
-  origin: { type: String, maxLength: 200 }, // 数据来源(手写的)
+  origin: { type: String }, // 数据来源(手写的)
 };
 
 const schema = new Schema(PatentSchema, { toJSON: { virtuals: true } });

+ 0 - 1
app/service/dock/patent.js

@@ -15,7 +15,6 @@ class PatentService extends CrudService {
     super(ctx, 'patent');
     this.model = this.ctx.model.Patent;
     this.root_path = _.get(this.ctx.app.config.export, 'root_path');
-    console.log(`root_path=>${this.root_path}`);
     this.file_type = '';
     if (!fs.existsSync(`${this.root_path}${this.file_type}`)) {
       // 如果不存在文件夹,就创建