|
@@ -0,0 +1,58 @@
|
|
|
+'use strict';
|
|
|
+const Schema = require('mongoose').Schema;
|
|
|
+const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
|
|
|
+const { ObjectId } = require('mongoose').Types;
|
|
|
+// 专利信息表
|
|
|
+const patent = {
|
|
|
+ create_number: { type: String, required: false }, // 申请号
|
|
|
+ create_date: { type: String, required: false }, // 申请日
|
|
|
+ success_number: { type: String, required: false }, // 公开(公告)号
|
|
|
+ success_date: { type: String, required: false }, // 公开(公告)日
|
|
|
+ inventor: { type: String, required: false }, // 发明人
|
|
|
+ agent: { type: String, required: false }, // 代理机构
|
|
|
+ agent_personal: { type: String, required: false }, // 代理人
|
|
|
+ address: { type: String, required: false }, // 发明人地址
|
|
|
+ name: { type: String, required: false }, // 标题
|
|
|
+ apply_personal: { type: String, required: false }, // 申请人
|
|
|
+ term: { type: String, required: false }, // 专利有效性
|
|
|
+ type: { type: String, required: false }, // 专利类型
|
|
|
+ nationality: { type: String, required: false }, // 公开国别
|
|
|
+ ipc_type: { type: String, required: false }, // IPC主分类
|
|
|
+ onlegal_status: { type: String, required: false }, // 当前法律状态
|
|
|
+ legal_status: { type: String, required: false }, // 法律状态
|
|
|
+ law_date: { type: String, required: false }, // 法律文书日期
|
|
|
+ on_obligee: { type: String, required: false }, // 当前权利人--变更前权利人
|
|
|
+ apply_address: { type: String, required: false }, // 申请人地址(其他)
|
|
|
+ apply_other: { type: String, required: false }, // 申请人(其他)
|
|
|
+ law_num: { type: String, required: false }, // 法律文书编号
|
|
|
+ first_opendate: { type: String, required: false }, // 首次公开日
|
|
|
+ empower_date: { type: String, required: false }, // 授权公告日
|
|
|
+ lose_date: { type: String, required: false }, // 失效日
|
|
|
+ examine_date: { type: String, required: false }, // 实质审查生效日
|
|
|
+ invention_design: { type: String, required: false }, // 发明(设计)人(其他)
|
|
|
+ incopat_link: { type: String, required: false }, // 链接到incoPat
|
|
|
+ first_ask: { type: String, required: false }, // 首项权利要求
|
|
|
+ first_apply: { type: String, required: false }, // 第一申请人
|
|
|
+ apply_city: { type: String, required: false }, // 中国申请人地市
|
|
|
+ business_code: { type: String, required: false }, // 工商统一社会信用代码
|
|
|
+ business_address: { type: String, required: false }, // 工商注册地址
|
|
|
+ first_inventor: { type: String, required: false }, // 第一发明人
|
|
|
+ shared_value: { type: String, required: false }, // 合享价值度
|
|
|
+ techol_stable: { type: String, required: false }, // 技术稳定性
|
|
|
+ techol_advanced: { type: String, required: false }, // 技术先进性
|
|
|
+ pct_apply: { type: String, required: false }, // PCT国际申请号
|
|
|
+ pct_publish: { type: String, required: false }, // PCT国际公布号
|
|
|
+ status: { type: String, required: false, default: '0' }, // 状态
|
|
|
+ abstract: { type: String, required: false }, // 摘要
|
|
|
+ img_url: { type: Array }, // 首页附图
|
|
|
+ user_id: { type: Array }, // 专利关联人
|
|
|
+ remark: { type: String },
|
|
|
+};
|
|
|
+const schema = new Schema(patent, { toJSON: { virtuals: true } });
|
|
|
+schema.index({ id: 1 });
|
|
|
+schema.index({ 'meta.createdAt': 1 });
|
|
|
+schema.plugin(metaPlugin);
|
|
|
+module.exports = app => {
|
|
|
+ const { mongoose } = app;
|
|
|
+ return mongoose.model('Patent', schema, 'patent');
|
|
|
+};
|