lrf vor 2 Jahren
Ursprung
Commit
37285e0133

+ 0 - 30
app/model/patent/agentMech.js

@@ -1,30 +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 { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
-// 代理机构表
-const agent_mech = {
-  pid: { type: ObjectId }, // 管理员id
-  pid_name: { type: String }, // 管理员名称
-  mech_name: { type: String }, // 机构名称
-  name: { type: String }, // 姓名
-  phone: { type: String }, // 手机号
-  password: { type: Secret, select: false }, // 密码
-  role: { type: String, default: '4' }, // 角色
-  remark: { type: String },
-};
-const schema = new Schema(agent_mech, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ pid: 1 });
-schema.index({ pid_name: 1 });
-schema.index({ mech_name: 1 });
-schema.index({ name: 1 });
-schema.index({ phone: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('AgentMech', schema, 'agentMech');
-};

+ 0 - 41
app/model/patent/answerTea.js

@@ -1,41 +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 { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
-// 咨询师表
-const answer_tea = {
-  name: { type: String }, // 姓名
-  phone: { type: String }, // 手机号
-  password: { type: Secret, select: false }, // 密码
-  card: { type: String }, // 身份证号
-  email: { type: String }, // 电子邮箱
-  address: { type: String }, // 地址
-  zwzc: { type: String }, // 职务职称
-  school: { type: String }, // 院校
-  major: { type: String }, // 专业
-  word_tel: { type: String }, // 办公电话
-  type: { type: String }, // 用户类型:1-咨询师;2-代理师;3-分析师
-  role: { type: String, default: '5' }, // 角色
-  remark: { type: String },
-};
-const schema = new Schema(answer_tea, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ name: 1 });
-schema.index({ phone: 1 });
-schema.index({ card: 1 });
-schema.index({ email: 1 });
-schema.index({ address: 1 });
-schema.index({ zwzc: 1 });
-schema.index({ school: 1 });
-schema.index({ major: 1 });
-schema.index({ word_tel: 1 });
-schema.index({ type: 1 });
-schema.index({ role: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('AnswerTea', schema, 'answerTea');
-};

+ 0 - 29
app/model/patent/dimension.js

@@ -1,29 +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 dimension = {
-  user_id: { type: ObjectId }, //
-  title: { type: String }, // 标题
-  publish_time: { type: String }, // 时间
-  origin: { type: String, default: '网站管理员' }, // 来源
-  brief: { type: String }, // 简介
-  is_show: { type: Boolean, default: false }, // 是否展示
-  filepath: { type: Object }, // 附件
-  content: { type: String }, // 正文内容
-  remark: { type: String },
-  create_time: { type: String }, // 创建时间
-};
-const schema = new Schema(dimension, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ title: 1 });
-schema.index({ publish_time: 1 });
-schema.index({ origin: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Dimension', schema, 'dimension');
-};

+ 0 - 41
app/model/patent/disclosure.js

@@ -1,41 +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 disclosure = {
-  user_id: { type: ObjectId }, // 用户id
-  admin_id: { type: ObjectId }, // 管理员id
-  name: { type: String }, // 发明名称
-  apply_name: { type: String }, // 申请人
-  type: { type: String }, // 申请类型
-  inventer: { type: String }, // 发明人
-  contact: { type: String }, // 技术联系人
-  phone: { type: String }, // 联系人电话
-  email: { type: String }, // 联系人邮箱
-  desc: { type: String }, // 特殊情况说明
-  questions: { type: Object }, // 问题
-  is_mech: { type: String }, // 是否需要机构
-  mechanism_id: { type: ObjectId }, // 机构id
-  mechanism_name: { type: String }, // 机构名称
-  status: { type: String, default: '0' }, // 状态:0-已申请;1-机构审核;-1-机构审核未通过;2-管理员评估;-2-管理员评估未通过;3-管理员评估通过,等待上传至国家库;4-上传完成
-  record: { type: Array }, // 记录
-  remark: { type: String },
-};
-const schema = new Schema(disclosure, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ admin_id: 1 });
-schema.index({ user_id: 1 });
-schema.index({ apply_name: 1 });
-schema.index({ name: 1 });
-schema.index({ status: 1 });
-schema.index({ is_mech: 1 });
-schema.index({ mechanism_id: 1 });
-schema.index({ mechanism_name: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Disclosure', schema, 'disclosure');
-};

+ 0 - 18
app/model/patent/importTemp.js

@@ -1,18 +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 import_temp = {
-  data: { type: Array }, // 数据
-  remark: { type: String },
-};
-const schema = new Schema(import_temp, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('ImportTemp', schema, 'importTemp');
-};

+ 0 - 22
app/model/patent/notice.js

@@ -1,22 +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 notice = {
-  to: { type: ObjectId }, // 接收人
-  content: { type: String }, // 内容
-  is_read: { type: Boolean, default: false }, // 是否已读
-  remark: { type: String },
-};
-const schema = new Schema(notice, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ to: 1 });
-schema.index({ is_read: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('DisclosureNotice', schema, 'disclosure_notice');
-};

+ 0 - 36
app/model/patent/patentanalysis.js

@@ -1,36 +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 patentanalysis = {
-  user_id: { type: ObjectId }, // 用户id
-  user_name: { type: String }, // 用户姓名
-  admin_id: { type: ObjectId }, // 管理员id
-  admin_name: { type: String }, // 管理员姓名
-  name: { type: String }, // 发明名称
-  apply_name: { type: String }, // 申请人
-  type: { type: String }, // 专利类型
-  inventor: { type: String }, // 发明人
-  contact: { type: String }, // 联系人
-  phone: { type: String }, // 联系人电话
-  email: { type: String }, // 联系人邮箱
-  questions: { type: Object, default: {} }, // 问题
-  file: { type: Array }, // 报告文件
-  status: { type: String, default: "0" }, // 状态
-  record: { type: Array }, // 记录
-  remark: { type: String },
-};
-const schema = new Schema(patentanalysis, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ user_id: 1 });
-schema.index({ admin_id: 1 });
-schema.index({ name: 1 });
-schema.index({ status: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentanalysis', schema, 'patent_analysis');
-};

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

@@ -1,47 +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 patentapply = {
-  user_id: { type: ObjectId }, // 用户id
-  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 }, // 申请号
-  name: { type: String }, // 发明名称
-  apply_name: { type: String }, // 申请人
-  type: { type: String }, // 申请类型
-  inventor: { type: String }, // 发明人
-  contact: { type: String }, // 技术联系人
-  phone: { type: String }, // 联系电话
-  email: { type: String }, // 电子邮箱
-  questions: { type: Object, default: {} }, // 问题
-  check_url: { type: Array }, // 审查文件
-  agent_url: { type: Array }, // 申请文件
-  record: { type: Array }, // 记录
-  status: { type: String, default: '0' }, // 状态0:待审查,1:审查通过,-1:审查未通过,2:科企&&代理机构,3:代理机构选择科企,-3:自己走,4:科企上传并下发
-  remark: { type: String },
-};
-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 });
-schema.index({ apply_name: 1 });
-schema.index({ type: 1 });
-schema.index({ status: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentapply', schema, 'patent_apply');
-};

+ 0 - 47
app/model/patent/patentassess.js

@@ -1,47 +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 patentassess = {
-  user_id: { type: ObjectId, required: false }, // 用户id
-  user_name: { type: String, required: false }, // 用户姓名
-  admin_id: { type: ObjectId, required: false }, // 管理员id
-  admin_name: { type: String, required: false }, // 管理员姓名
-  patent_id: { type: ObjectId }, // 专利id
-  create_number: { type: String, required: false }, // 申请号
-  patent_name: { type: String, required: false }, // 专利名称
-  inventor: { type: String, required: false }, // 发明人
-  type: { type: String, required: false }, // 专利类型
-  contact: { type: String, required: false }, // 联系人
-  phone: { type: String, required: false }, // 联系人电话
-  email: { type: String, required: false }, // 联系人邮箱
-  abstract: { type: String, required: false }, // 摘要
-  field: { type: String, required: false }, // 应用领域
-  explain: { type: String, required: false }, // 技术说明
-  shared_value: { type: String, required: false }, // 合享价值度
-  techol_stable: { type: String, required: false }, // 技术稳定性
-  techol_advanced: { type: String, required: false }, // 技术先进性
-  is_money: { type: Boolean, default: false }, // 是否缴费
-  status: { type: String, default: '0' }, // 状态
-  report: { type: Array }, // 评估报告
-  record: { type: Array }, // 记录
-  remark: { type: String },
-};
-const schema = new Schema(patentassess, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ user_id: 1 });
-schema.index({ admin_id: 1 });
-schema.index({ patent_id: 1 });
-schema.index({ create_number: 1 });
-schema.index({ patent_name: 1 });
-schema.index({ type: 1 });
-schema.index({ is_money: 1 });
-schema.index({ status: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentassess', schema, 'patent_assess');
-};

+ 0 - 31
app/model/patent/patentchat.js

@@ -1,31 +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 { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
-const { ObjectId } = require('mongoose').Types;
-// 专利资讯服务聊天表
-const patentchat = {
-  // room_id: { type: ObjectId, required: true }, // 聊天房间id
-  sender_id: { type: ObjectId, required: true }, // 发送人id
-  sender_name: { type: String, required: false }, // 发送人名字
-  receiver_id: { type: ObjectId, required: true }, // 接收人id
-  receiver_name: { type: String, required: false }, // 接收人名字
-  type: { type: String, required: false }, // 内容類型:1:内容,2:文件
-  content: { type: String, required: false }, // 内容
-  file: { type: Array }, // 文件
-  is_read: { type: Boolean, default: false }, // 是否已读
-  send_time: { type: String, default: moment().format('YYYY-MM-DD HH:mm:ss') },
-};
-const schema = new Schema(patentchat, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ sender_id: 1 });
-schema.index({ sender_name: 1 });
-schema.index({ receiver_id: 1 });
-schema.index({ receiver_name: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentchat', schema, 'patent_chat');
-};

+ 0 - 27
app/model/patent/patentearly.js

@@ -1,27 +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 patentearly = {
-  parent_id: { type: ObjectId }, // 专利id
-  name: { type: String }, // 专利名称
-  inventor: { type: String }, // 发明人
-  lose_date: { type: String }, // 截止时间
-  content: { type: String }, // 预警消息
-  early_num: { type: String }, // 预警次数,1:三个月,2:两个月,3:一个月
-  user_id: { type: [ ObjectId ] }, // 接收人id
-  remark: { type: String },
-};
-const schema = new Schema(patentearly, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ parent_id: 1 });
-schema.index({ name: 1 });
-schema.index({ inventor: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentearly', schema, 'patent_early');
-};

+ 0 - 22
app/model/patent/patentexamine.js

@@ -1,22 +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 patentexamine = {
-  to: { type: ObjectId }, // 接收人
-  content: { type: String }, // 内容
-  is_read: { type: Boolean, default: false }, // 是否已读
-  remark: { type: String },
-};
-const schema = new Schema(patentexamine, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ to: 1 });
-schema.index({ is_read: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentexamine', schema, 'patent_examine');
-};

+ 0 - 86
app/model/patent/patentinfo.js

@@ -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');
-};

+ 0 - 30
app/model/patent/patentnav.js

@@ -1,30 +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 patentnav = {
-  user_id: { type: ObjectId }, //
-  title: { type: String }, // 标题
-  publish_time: { type: String }, // 时间
-  origin: { type: String, default: '网站管理员' }, // 来源
-  brief: { type: String }, // 简介
-  is_show: { type: Boolean, default: false }, // 是否展示
-  filepath: { type: Object }, // 附件
-  content: { type: String }, // 正文内容
-  remark: { type: String },
-  create_time: { type: String }, // 创建时间
-};
-const schema = new Schema(patentnav, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ title: 1 });
-schema.index({ publish_time: 1 });
-schema.index({ is_show: 1 });
-schema.index({ origin: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentnav', schema, 'patentnav');
-};

+ 0 - 30
app/model/patent/patentnotice.js

@@ -1,30 +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 patentnotice = {
-  send_id: { type: ObjectId }, // 发送人id
-  send_name: { type: String }, // 发送人姓名
-  to_type: { type: String }, // 0-所有人;1-机构用户;2-平台用户;3机构发给自己用户,4:科企发给个人用户
-  to_id: { type: [ ObjectId ] }, // 接收人id
-  to_name: { type: String }, // 接收人姓名
-  is_read: { type: Boolean, default: false }, // 是否已读
-  content: { type: String }, // 内容
-  notice_file: { type: Array }, // 通知文件
-  remark: { type: String },
-};
-const schema = new Schema(patentnotice, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ send_id: 1 });
-schema.index({ send_name: 1 });
-schema.index({ to_type: 1 });
-schema.index({ to_id: 1 });
-schema.index({ is_read: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentnotice', schema, 'patent_notice');
-};

+ 0 - 30
app/model/patent/patentroom.js

@@ -1,30 +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 { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
-const { ObjectId } = require('mongoose').Types;
-// 专利资讯服务房间表
-const patentroom = {
-  time_id: { type: ObjectId }, // 时间id
-  p1_id: { type: ObjectId, required: true }, // 第一个人id
-  p1: { type: String, required: false }, // 第一个人名
-  p2_id: { type: ObjectId, required: true }, // 第二个人id
-  p2: { type: String, required: false }, // 第二个人名
-  create_time: {
-    type: String,
-    default: moment().format('YYYY-MM-DD HH:mm:ss'),
-  },
-  last_time: { type: String }, // 最后发言时间
-};
-const schema = new Schema(patentroom, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ time_id: 1 });
-schema.index({ p1_id: 1 });
-schema.index({ p2_id: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentroom', schema, 'patent_room');
-};

+ 0 - 35
app/model/patent/patentsafeg.js

@@ -1,35 +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 patentsafeg = {
-  user_id: { type: ObjectId }, // 用户id
-  admin_id: { type: ObjectId }, // 管理员id
-  create_number: { type: String }, // 申请号
-  name: { type: String }, // 发明名称
-  apply_personal: { type: String }, // 申请人
-  type: { type: String }, // 申请类型
-  inventor: { type: String }, // 发明人
-  contact: { type: String }, // 联系人
-  phone: { type: String }, // 联系人电话
-  email: { type: String }, // 联系人邮箱
-  questions: { type: Object }, // 问题
-  file: { type: Array }, // 报告文件
-  record: { type: Array }, // 记录
-  status: { type: String, default: '0' }, // 状态
-  remark: { type: String },
-};
-const schema = new Schema(patentsafeg, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ user_id: 1 });
-schema.index({ admin_id: 1 });
-schema.index({ create_number: 1 });
-schema.index({ status: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentsafeg', schema, 'patent_safeg');
-};

+ 0 - 31
app/model/patent/patenttechol.js

@@ -1,31 +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 patenttechol = {
-  order_num: { type: String }, // 需求订单号
-  describe: { type: String }, // 需求描述(用途)
-  urgent: { type: String }, // 紧急程度
-  contact: { type: String }, // 联系人
-  phone: { type: String }, // 联系电话
-  email: { type: String }, // 电子邮箱
-  requirement: { type: String }, // 合作条件及要求
-  status: { type: String }, // 状态
-  remark: { type: String },
-};
-const schema = new Schema(patenttechol, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ order_num: 1 });
-schema.index({ urgent: 1 });
-schema.index({ contact: 1 });
-schema.index({ phone: 1 });
-schema.index({ email: 1 });
-schema.index({ status: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patenttechol', schema, 'patent_techol');
-};

+ 0 - 52
app/model/patent/patenttrans.js

@@ -1,52 +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 patenttrans = {
-  user_id: { type: ObjectId }, // 用户id
-  user_name: { type: String }, // 用户姓名
-  mech_id: { type: ObjectId }, // 机构id
-  mech_name: { type: String }, // 机构姓名
-  patent_id: { type: ObjectId }, // 专利id
-  patent_name: { type: String }, // 专利名称
-  create_number: { type: String }, // 专利号
-  on_obligee: { type: String }, // 当前权利人(变更前专利权人)
-  contact: { type: String }, // 联系人
-  phone: { type: String }, // 联系电话
-  email: { type: String }, // 电子邮箱
-  budget: { type: String }, // 投资预算
-  type: { type: String }, // 交易类型(转让,许可,免费许可,招商,质押)
-  promise_file: { type: Object }, // 交易类型为免费许可时,需填写免费许可承诺书
-  is_report: { type: Boolean, default: false }, // 评估报告
-  report: { type: Array }, // 评估报告
-  requirementdesc: { type: String }, // 技术说明
-  expect: { type: String }, // 商业预期
-  condition: { type: String }, // 合作条件及要求
-  abstract: { type: String }, // 摘要
-  on_afterobligee: { type: String }, // 变更后专利权人
-  transfer_date: { type: String }, // 专利权转移日期
-  is_contract: { type: String }, // 0:线下合同,1:线上合同
-  contract: { type: Object }, // 线上合同
-  offine_contract: { type: Array }, // 线下合同
-  status: { type: String, default: '0' }, // 状态,0:待审,1:通过,-1:拒绝,2:合同审核,3:合同通过,-3:合同拒绝,4:用户确认,5:归档交易完成
-  record: { type: Array }, // 记录
-  remark: { type: String },
-  isdel: { type: String, required: false, default: '0' }, // 0=>未删除;1=>已撤回
-};
-const schema = new Schema(patenttrans, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ user_id: 1 });
-schema.index({ mech_id: 1 });
-schema.index({ patent_id: 1 });
-schema.index({ create_number: 1 });
-schema.index({ type: 1 });
-schema.index({ transfer_date: 1 });
-schema.index({ status: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patenttrans', schema, 'patent_trans');
-};

+ 0 - 31
app/model/patent/patentwarning.js

@@ -1,31 +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 patentwarning = {
-  to_id: { type: ObjectId }, // 接收人id
-  to_name: { type: String }, // 接收人姓名
-  create_number: { type: String }, // 专利申请号
-  patent_id: { type: ObjectId }, // 预警专利id
-  patent_name: { type: String }, // 预警专利姓名
-  content: { type: String }, // 预警信息
-  file_url: { type: Array }, // 预警文件
-  is_read: { type: Boolean, default: false }, // 是否已读
-  remark: { type: String },
-};
-const schema = new Schema(patentwarning, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ to_id: 1 });
-schema.index({ to_name: 1 });
-schema.index({ create_number: 1 });
-schema.index({ patent_id: 1 });
-schema.index({ patent_name: 1 });
-schema.index({ is_read: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Patentwarning', schema, 'patent_warning');
-};

+ 0 - 33
app/model/patent/problemService.js

@@ -1,33 +0,0 @@
-'use strict';
-const Schema = require('mongoose').Schema;
-const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
-
-// 问题咨询
-const problem_service = {
-  name: { type: String, required: false }, // 问题名称
-  ask_id: { type: String, required: false }, // 发问人id
-  ask_name: { type: String, required: false }, // 发问人
-  ask_date: { type: String, required: false }, // 发问时间
-  ask_explain: { type: String, required: false }, // 问题说明
-  ask_file: { type: Array, required: false }, // 问题文件
-  answer_id: { type: String, required: false }, // 答题人id
-  answer_name: { type: String, required: false }, // 答题人
-  answer_date: { type: String, required: false }, // 答题时间
-  answer_explain: { type: String, required: false }, // 答题说明
-  answer_file: { type: Array, required: false }, // 答题文件
-  status: { type: String, required: false }, // 状态:【0:待受理,1:已分配,2:已回答,3:已发送答案,4:已阅读】
-};
-const schema = new Schema(problem_service, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.index({ name: 1 });
-schema.index({ ask_id: 1 });
-schema.index({ ask_name: 1 });
-schema.index({ ask_date: 1 });
-schema.index({ answer_id: 1 });
-
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('ProblemService', schema, 'problemService');
-};

+ 0 - 32
app/model/patent/purchase.js

@@ -1,32 +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 purchase = {
-  user_id: { type: ObjectId }, // 用户id
-  demand: { type: String }, // 求购专利要求
-  type: { type: String }, // 专利类型
-  purchase_type: { type: String }, // 求购类型:许可,转移,质押
-  money: { type: String }, // 预算金额
-  contacts: { type: String }, // 联系人
-  phone: { type: String }, // 手机号
-  email: { type: String }, // 邮箱
-  status: { type: String }, // 状态
-  remark: { type: String },
-};
-const schema = new Schema(purchase, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ user_id: 1 });
-schema.index({ type: 1 });
-schema.index({ purchase_type: 1 });
-schema.index({ contacts: 1 });
-schema.index({ status: 1 });
-schema.index({ money: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('PatentPurchase', schema, 'patent_purchase');
-};

+ 0 - 20
app/model/patent/report.js

@@ -1,20 +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 report = {
-  disclosure_id: { type: ObjectId }, // 申请id
-  content: { type: String }, // 内容
-  remark: { type: String },
-};
-const schema = new Schema(report, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ disclosure_id: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('DisclosureReport', schema, 'disclosure_report');
-};

+ 0 - 40
app/model/patent/sell.js

@@ -1,40 +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 sell = {
-  user_id: { type: ObjectId }, // 用户id
-  patent_id: { type: ObjectId }, // 专利id
-  create_number: { type: String }, // 申请号
-  name: { type: String }, // 专利名称
-  inventor: { type: String }, // 权利人
-  type: { type: String }, // 申请类型
-  sell_type: { type: String }, // 交易类型:许可,转移,质押
-  money_type: { type: String }, // 交易金额方式
-  sell_money: { type: Number }, // 交易金额
-  contacts: { type: String }, // 联系人
-  phone: { type: String }, // 手机号
-  email: { type: String }, // 邮箱
-  status: { type: String }, // 状态
-  remark: { type: String },
-};
-const schema = new Schema(sell, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ user_id: 1 });
-schema.index({ patent_id: 1 });
-schema.index({ create_number: 1 });
-schema.index({ name: 1 });
-schema.index({ type: 1 });
-schema.index({ sell_type: 1 });
-schema.index({ money_type: 1 });
-schema.index({ contacts: 1 });
-schema.index({ status: 1 });
-schema.index({ sell_money: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('PatentSell', schema, 'patent_sell');
-};

+ 0 - 59
app/model/patent/tradeorder.js

@@ -1,59 +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 { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
-const { ObjectId } = require('mongoose').Types;
-// 出售信息
-const sells = new Schema({
-  sell_id: { type: ObjectId }, // 出售id
-  selluser_id: { type: ObjectId }, // 出售者id
-  contacts: { type: String }, // 出售者联系人
-  phone: { type: String }, // 出售者手机号
-  email: { type: String }, // 出售者电子邮箱
-  patent_id: { type: String }, // 出售者专利id
-  patent_type: { type: String }, // 出售者专利类型
-  selle_type: { type: String }, // 出售者交易类型
-  money: { type: String }, // 出售者钱(元/年)
-});
-// 求购信息
-const purchases = new Schema({
-  purchases_id: { type: ObjectId }, // 求购id
-  purchasesuser_id: { type: ObjectId }, // 求购者id
-  contacts: { type: String }, // 求购者联系人
-  phone: { type: String }, // 求购者手机号
-  email: { type: String }, // 求购者电子邮箱
-  demand: { type: String }, // 求购者需求
-  patent_type: { type: String }, // 求购者专利类型
-  purchases_type: { type: String }, // 求购者交易类型
-  money: { type: String }, // 出售者钱(万元)
-
-});
-// 订单表
-const tradeorder = {
-  order_num: { type: String }, // 订单id
-  buyer_id: { type: ObjectId }, // 买家id
-  buyer_contacts: { type: String }, // 买家联系人
-  buyer_phone: { type: String }, // 买家手机号
-  buyer_email: { type: String }, // 买家邮箱
-  type: { type: String }, // 订单类型
-  sell: { type: sells }, // 出售信息
-  purchase: { type: purchases }, // 求购信息
-  status: { type: String }, // 状态
-  remark: { type: String },
-};
-const schema = new Schema(tradeorder, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ order_id: 1 });
-schema.index({ buyer_id: 1 });
-schema.index({ sell_id: 1 });
-schema.index({ selluser_id: 1 });
-schema.index({ purchases_id: 1 });
-schema.index({ purchasesuser_id: 1 });
-schema.index({ status: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('Tradeorder', schema, 'trade_order');
-};