|
@@ -1,86 +0,0 @@
|
|
|
-'use strict';
|
|
|
-const Schema = require('mongoose').Schema;
|
|
|
-const moment = require('moment');
|
|
|
-const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
|
|
|
-const { ObjectId } = require('mongoose').Types;
|
|
|
-// 专利信息表
|
|
|
-const patentinfo = {
|
|
|
- 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 }, // 代理人
|
|
|
- abstract: { 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 }, // 专利类型
|
|
|
- img_url: { type: Array }, // 首页附图
|
|
|
- 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' }, // 状态
|
|
|
- trans_status: { type: String, required: false, default: '0' }, // 交易状态
|
|
|
- user_id: { type: Array }, // 专利关联人
|
|
|
- remark: { type: String },
|
|
|
-};
|
|
|
-const schema = new Schema(patentinfo, { toJSON: { virtuals: true } });
|
|
|
-schema.index({ id: 1 });
|
|
|
-schema.index({ create_number: 1 });
|
|
|
-schema.index({ create_date: 1 });
|
|
|
-schema.index({ success_number: 1 });
|
|
|
-schema.index({ success_date: 1 });
|
|
|
-schema.index({ name: 1 });
|
|
|
-schema.index({ apply_personal: 1 });
|
|
|
-schema.index({ term: 1 });
|
|
|
-schema.index({ type: 1 });
|
|
|
-schema.index({ nationality: 1 });
|
|
|
-schema.index({ ipc_type: 1 });
|
|
|
-schema.index({ law_date: 1 });
|
|
|
-schema.index({ on_obligee: 1 });
|
|
|
-schema.index({ apply_other: 1 });
|
|
|
-schema.index({ law_num: 1 });
|
|
|
-schema.index({ first_opendate: 1 });
|
|
|
-schema.index({ empower_date: 1 });
|
|
|
-schema.index({ lose_date: 1 });
|
|
|
-schema.index({ examine_date: 1 });
|
|
|
-schema.index({ first_apply: 1 });
|
|
|
-schema.index({ business_code: 1 });
|
|
|
-schema.index({ first_inventor: 1 });
|
|
|
-schema.index({ pct_apply: 1 });
|
|
|
-schema.index({ pct_publish: 1 });
|
|
|
-schema.index({ status: 1 });
|
|
|
-schema.index({ trans_status: 1 });
|
|
|
-// schema.index({ user_id: 1 });
|
|
|
-schema.index({ 'meta.createdAt': 1 });
|
|
|
-schema.plugin(metaPlugin);
|
|
|
-module.exports = app => {
|
|
|
- const { mongoose } = app;
|
|
|
- return mongoose.model('Patentinfo', schema, 'patent_info');
|
|
|
-};
|