guhongwei 3 年之前
父节点
当前提交
7a10322240

+ 76 - 0
app/controller/patent/.patentanalysis.js

@@ -0,0 +1,76 @@
+module.exports = {
+  create: {
+    requestBody: [
+      "user_id",
+      "admin_id",
+      "is_mech",
+      "mechanism_id",
+      "mechanism_name",
+      "name",
+      "apply_name",
+      "type",
+      "inventer",
+      "contact",
+      "phone",
+      "email",
+      "questions",
+      "status",
+    ],
+  },
+  destroy: {
+    params: ["!id"],
+    service: "delete",
+  },
+  update: {
+    params: ["!id"],
+    requestBody: [
+      "user_id",
+      "admin_id",
+      "is_mech",
+      "mechanism_id",
+      "mechanism_name",
+      "name",
+      "apply_name",
+      "type",
+      "inventer",
+      "contact",
+      "phone",
+      "email",
+      "questions",
+      "status",
+    ],
+  },
+  show: {
+    parameters: {
+      params: ["!id"],
+    },
+    service: "fetch",
+  },
+  index: {
+    parameters: {
+      query: {
+        user_id: "user_id",
+        admin_id: "admin_id",
+        is_mech: "is_mech",
+        mechanism_id: "mechanism_id",
+        mechanism_name: "mechanism_name",
+        name: "name",
+        apply_name: "apply_name",
+        type: "type",
+        status: "status",
+        "create_time@start": "create_time@start",
+        "create_time@end": "create_time@end",
+      },
+      // options: {
+      //   "meta.state": 0 // 默认条件
+      // },
+    },
+    service: "query",
+    options: {
+      query: ["skip", "limit"],
+      sort: ["meta.createdAt"],
+      desc: true,
+      count: true,
+    },
+  },
+};

+ 76 - 0
app/controller/patent/.patentapply.js

@@ -0,0 +1,76 @@
+module.exports = {
+  create: {
+    requestBody: [
+      "user_id",
+      "admin_id",
+      "is_mech",
+      "mechanism_id",
+      "mechanism_name",
+      "name",
+      "apply_name",
+      "type",
+      "inventer",
+      "contact",
+      "phone",
+      "email",
+      "questions",
+      "status",
+    ],
+  },
+  destroy: {
+    params: ["!id"],
+    service: "delete",
+  },
+  update: {
+    params: ["!id"],
+    requestBody: [
+      "user_id",
+      "admin_id",
+      "is_mech",
+      "mechanism_id",
+      "mechanism_name",
+      "name",
+      "apply_name",
+      "type",
+      "inventer",
+      "contact",
+      "phone",
+      "email",
+      "questions",
+      "status",
+    ],
+  },
+  show: {
+    parameters: {
+      params: ["!id"],
+    },
+    service: "fetch",
+  },
+  index: {
+    parameters: {
+      query: {
+        user_id: "user_id",
+        admin_id: "admin_id",
+        is_mech: "is_mech",
+        mechanism_id: "mechanism_id",
+        mechanism_name: "mechanism_name",
+        name: "name",
+        apply_name: "apply_name",
+        type: "type",
+        status: "status",
+        "create_time@start": "create_time@start",
+        "create_time@end": "create_time@end",
+      },
+      // options: {
+      //   "meta.state": 0 // 默认条件
+      // },
+    },
+    service: "query",
+    options: {
+      query: ["skip", "limit"],
+      sort: ["meta.createdAt"],
+      desc: true,
+      count: true,
+    },
+  },
+};

+ 55 - 0
app/controller/patent/.patentassess.js

@@ -0,0 +1,55 @@
+module.exports = {
+  create: {
+    requestBody: [
+      "user_id",
+      "patent_id",
+      "patent_name",
+      "is_money",
+      "expert",
+      "report",
+      "status",
+    ],
+  },
+  destroy: {
+    params: ["!id"],
+    service: "delete",
+  },
+  update: {
+    params: ["!id"],
+    requestBody: [
+      "user_id",
+      "patent_id",
+      "patent_name",
+      "is_money",
+      "expert",
+      "report",
+      "status",
+    ],
+  },
+  show: {
+    parameters: {
+      params: ["!id"],
+    },
+    service: "fetch",
+  },
+  index: {
+    parameters: {
+      query: {
+        user_id: "user_id",
+        patent_id: "patent_id",
+        patent_name: "patent_name",
+        is_money: "is_money",
+      },
+      // options: {
+      //   "meta.state": 0 // 默认条件
+      // },
+    },
+    service: "query",
+    options: {
+      query: ["skip", "limit"],
+      sort: ["meta.createdAt"],
+      desc: true,
+      count: true,
+    },
+  },
+};

+ 56 - 0
app/controller/patent/.patentchat.js

@@ -0,0 +1,56 @@
+module.exports = {
+  create: {
+    requestBody: [
+      "!room_id",
+      "!sender_id",
+      "sender_name",
+      "!receiver_id",
+      "receiver_name",
+      "!content",
+    ],
+  },
+  destroy: {
+    params: ["!id"],
+    service: "delete",
+  },
+  update: {
+    params: ["!id"],
+    requestBody: [
+      "room_id",
+      "sender_id",
+      "sender_name",
+      "receiver_id",
+      "receiver_name",
+      "content",
+      "is_read",
+    ],
+  },
+  show: {
+    parameters: {
+      params: ["!id"],
+    },
+    service: "fetch",
+  },
+  index: {
+    parameters: {
+      query: {
+        sender_id: "sender_id",
+        receiver_id: "receiver_id",
+        room_id: "room_id",
+        is_read:"is_read",
+        "create_time@start": "create_time@start",
+        "create_time@end": "create_time@end",
+      },
+      // options: {
+      //   "meta.state": 0 // 默认条件
+      // },
+    },
+    service: "query",
+    options: {
+      query: ["skip", "limit"],
+      sort: ["send_time"],
+      asc: true,
+      count: true,
+    },
+  },
+};

+ 38 - 0
app/controller/patent/.patentexamine.js

@@ -0,0 +1,38 @@
+module.exports = {
+  create: {
+    requestBody: ["to", "content", "is_read"],
+  },
+  destroy: {
+    params: ["!id"],
+    service: "delete",
+  },
+  update: {
+    params: ["!id"],
+    requestBody: ["to", "content", "is_read"],
+  },
+  show: {
+    parameters: {
+      params: ["!id"],
+    },
+    service: "fetch",
+  },
+  index: {
+    parameters: {
+      query: {
+        to: "to",
+        content: "content",
+        is_read: "is_read",
+      },
+      // options: {
+      //   "meta.state": 0 // 默认条件
+      // },
+    },
+    service: "query",
+    options: {
+      query: ["skip", "limit"],
+      sort: ["meta.createdAt"],
+      desc: true,
+      count: true,
+    },
+  },
+};

+ 38 - 0
app/controller/patent/.patentnotice.js

@@ -0,0 +1,38 @@
+module.exports = {
+  create: {
+    requestBody: ["to", "content", "is_read"],
+  },
+  destroy: {
+    params: ["!id"],
+    service: "delete",
+  },
+  update: {
+    params: ["!id"],
+    requestBody: ["to", "content", "is_read"],
+  },
+  show: {
+    parameters: {
+      params: ["!id"],
+    },
+    service: "fetch",
+  },
+  index: {
+    parameters: {
+      query: {
+        to: "to",
+        content: "content",
+        is_read: "is_read",
+      },
+      // options: {
+      //   "meta.state": 0 // 默认条件
+      // },
+    },
+    service: "query",
+    options: {
+      query: ["skip", "limit"],
+      sort: ["meta.createdAt"],
+      desc: true,
+      count: true,
+    },
+  },
+};

+ 13 - 0
app/controller/patent/patentanalysis.js

@@ -0,0 +1,13 @@
+'use strict';
+const meta = require('./.patentanalysis.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 专利分析-交底书
+class patentanalysisController extends Controller {
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.patent.patentanalysis;
+  }
+}
+module.exports = CrudController(patentanalysisController, meta);

+ 13 - 0
app/controller/patent/patentapply.js

@@ -0,0 +1,13 @@
+'use strict';
+const meta = require('./.patentapply.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 专利申请-审批单
+class PatentapplyController extends Controller {
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.patent.patentapply;
+  }
+}
+module.exports = CrudController(PatentapplyController, meta);

+ 13 - 0
app/controller/patent/patentassess.js

@@ -0,0 +1,13 @@
+'use strict';
+const meta = require('./.patentassess.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 专利评估表
+class PatentassessController extends Controller {
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.patent.patentassess;
+  }
+}
+module.exports = CrudController(PatentassessController, meta);

+ 13 - 0
app/controller/patent/patentchat.js

@@ -0,0 +1,13 @@
+'use strict';
+const meta = require('./.patentchat.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 专利资讯服务聊天表
+class PatentchatController extends Controller {
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.patent.patentchat;
+  }
+}
+module.exports = CrudController(PatentchatController, meta);

+ 13 - 0
app/controller/patent/patentexamine.js

@@ -0,0 +1,13 @@
+'use strict';
+const meta = require('./.patentexamine.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 审核通知
+class PatentexamineController extends Controller {
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.patent.patentexamine;
+  }
+}
+module.exports = CrudController(PatentexamineController, meta);

+ 13 - 0
app/controller/patent/patentnotice.js

@@ -0,0 +1,13 @@
+'use strict';
+const meta = require('./.patentnotice.js');
+const Controller = require('egg').Controller;
+const { CrudController } = require('naf-framework-mongoose/lib/controller');
+
+// 通知
+class PatentnoticeController extends Controller {
+  constructor(ctx) {
+    super(ctx);
+    this.service = this.ctx.service.patent.patentnotice;
+  }
+}
+module.exports = CrudController(PatentnoticeController, meta);

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

@@ -0,0 +1,40 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const moment = require('moment');
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+const { ObjectId } = require('mongoose').Types;
+// 专利分析-交底单
+const patentanalysis = {
+  user_id: { type: ObjectId }, // 用户id
+  admin_id: { type: ObjectId }, // 管理员id
+  is_mech: { type: String }, // 是否需要机构
+  mechanism_id: { type: ObjectId }, // 机构id
+  mechanism_name: { type: String }, // 机构名称
+  name: { type: String }, // 发明名称
+  apply_name: { type: String }, // 申请人
+  type: { type: String }, // 申请类型
+  inventer: { type: String }, // 发明人
+  contact: { type: String }, // 联系人
+  phone: { type: String }, // 联系人电话
+  email: { type: String }, // 联系人邮箱
+  questions: { type: Object }, // 问题
+  record: { type: Array }, // 记录
+  status: { type: String, default: '0' }, // 状态
+  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({ is_mech: 1 });
+schema.index({ mechanism_id: 1 });
+schema.index({ mechanism_name: 1 });
+schema.index({ name: 1 });
+schema.index({ apply_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');
+};

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

@@ -0,0 +1,40 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const moment = require('moment');
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+const { ObjectId } = require('mongoose').Types;
+// 专利申请-审批单
+const patentapply = {
+  user_id: { type: ObjectId }, // 用户id
+  admin_id: { type: ObjectId }, // 管理员id
+  is_mech: { type: String }, // 是否需要机构
+  mechanism_id: { type: ObjectId }, // 机构id
+  mechanism_name: { type: String }, // 机构名称
+  name: { type: String }, // 发明名称
+  apply_name: { type: String }, // 申请人
+  type: { type: String }, // 申请类型
+  inventer: { type: String }, // 发明人
+  contact: { type: String }, // 联系人
+  phone: { type: String }, // 联系人电话
+  email: { type: String }, // 联系人邮箱
+  questions: { type: Object }, // 问题
+  record: { type: Array }, // 记录
+  status: { type: String, default: '0' }, // 状态
+  remark: { type: String },
+};
+const schema = new Schema(patentapply, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.index({ user_id: 1 });
+schema.index({ admin_id: 1 });
+schema.index({ is_mech: 1 });
+schema.index({ mechanism_id: 1 });
+schema.index({ mechanism_name: 1 });
+schema.index({ name: 1 });
+schema.index({ apply_name: 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');
+};

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

@@ -0,0 +1,27 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const moment = require('moment');
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+const { ObjectId } = require('mongoose').Types;
+// 专利评估表
+const patentassess = {
+  user_id: { type: ObjectId }, // 用户id
+  patent_id: { type: ObjectId }, // 专利id
+  patent_name: { type: String }, // 专利名称
+  is_money: { type: Boolean, default: false }, // 是否缴费
+  expert: { type: Array }, // 专家
+  report: { type: String }, // 评估报告
+  status: { type: String }, // 状态
+  remark: { type: String },
+};
+const schema = new Schema(patentassess, { toJSON: { virtuals: true } });
+schema.index({ id: 1 });
+schema.index({ user_id: 1 });
+schema.index({ patent_id: 1 });
+schema.index({ is_money: 1 });
+schema.index({ 'meta.createdAt': 1 });
+schema.plugin(metaPlugin);
+module.exports = app => {
+  const { mongoose } = app;
+  return mongoose.model('Patentassess', schema, 'patent_assess');
+};

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

@@ -0,0 +1,29 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const moment = require('moment');
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+const { Secret } = require('naf-framework-mongoose/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 }, // 接收人名字
+  content: { type: String, required: true }, // 内容
+  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');
+};

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

@@ -0,0 +1,22 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const moment = require('moment');
+const metaPlugin = require('naf-framework-mongoose/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');
+};

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

@@ -0,0 +1,22 @@
+'use strict';
+const Schema = require('mongoose').Schema;
+const moment = require('moment');
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
+const { ObjectId } = require('mongoose').Types;
+// 通知表
+const patentnotice = {
+  to: { type: ObjectId }, // 接收人
+  content: { type: String }, // 内容
+  is_read: { type: Boolean, default: false }, // 是否已读
+  remark: { type: String },
+};
+const schema = new Schema(patentnotice, { 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('Patentnotice', schema, 'patent_notice');
+};

+ 6 - 0
app/router.js

@@ -78,4 +78,10 @@ module.exports = app => {
   require('./router/patent/tradeorder')(app); // 交易订单
   // 2021-08-20-重定义
   require('./router/patent/patentroom')(app); // 专利资讯服务房间表
+  require('./router/patent/patentchat')(app); // 专利资讯服务聊天表
+  require('./router/patent/patentexamine')(app); // 审核通知表
+  require('./router/patent/patentnotice')(app); // 通知表
+  require('./router/patent/patentapply')(app); // 专利申请表-审批单
+  require('./router/patent/patentanalysis')(app); // 专利分析表-交底单
+  require('./router/patent/patentassess')(app); // 专利评估表
 };

+ 13 - 0
app/router/patent/patentanalysis.js

@@ -0,0 +1,13 @@
+'use strict';
+
+
+module.exports = app => {
+  const { router, controller } = app;
+  const profix = '/api/live/';
+  const vision = 'v0';
+  const index = 'patent';
+  const target = 'patentanalysis';
+  const metaTime = app.middleware.createTime();
+  router.resources(target, `${profix}${vision}/${index}/${target}`, metaTime, controller[index][target]); // index、create、show、destroy
+  router.post(target, `${profix}${vision}/${index}/${target}/update/:id`, controller[index][target].update);
+};

+ 13 - 0
app/router/patent/patentapply.js

@@ -0,0 +1,13 @@
+'use strict';
+
+
+module.exports = app => {
+  const { router, controller } = app;
+  const profix = '/api/live/';
+  const vision = 'v0';
+  const index = 'patent';
+  const target = 'patentapply';
+  const metaTime = app.middleware.createTime();
+  router.resources(target, `${profix}${vision}/${index}/${target}`, metaTime, controller[index][target]); // index、create、show、destroy
+  router.post(target, `${profix}${vision}/${index}/${target}/update/:id`, controller[index][target].update);
+};

+ 13 - 0
app/router/patent/patentassess.js

@@ -0,0 +1,13 @@
+'use strict';
+
+
+module.exports = app => {
+  const { router, controller } = app;
+  const profix = '/api/live/';
+  const vision = 'v0';
+  const index = 'patent';
+  const target = 'patentassess';
+  const metaTime = app.middleware.createTime();
+  router.resources(target, `${profix}${vision}/${index}/${target}`, metaTime, controller[index][target]); // index、create、show、destroy
+  router.post(target, `${profix}${vision}/${index}/${target}/update/:id`, controller[index][target].update);
+};

+ 12 - 0
app/router/patent/patentchat.js

@@ -0,0 +1,12 @@
+'use strict';
+
+
+module.exports = app => {
+  const { router, controller } = app;
+  const profix = '/api/live/';
+  const vision = 'v0';
+  const index = 'patent';
+  const target = 'patentchat';
+  router.resources(target, `${profix}${vision}/${index}/${target}`, controller[index][target]); // index、create、show、destroy
+  router.post(target, `${profix}${vision}/${index}/${target}/update/:id`, controller[index][target].update);
+};

+ 12 - 0
app/router/patent/patentexamine.js

@@ -0,0 +1,12 @@
+'use strict';
+
+
+module.exports = app => {
+  const { router, controller } = app;
+  const profix = '/api/live/';
+  const vision = 'v0';
+  const index = 'patent';
+  const target = 'patentexamine';
+  router.resources(target, `${profix}${vision}/${index}/${target}`, controller[index][target]); // index、create、show、destroy
+  router.post(target, `${profix}${vision}/${index}/${target}/update/:id`, controller[index][target].update);
+};

+ 13 - 0
app/router/patent/patentnotice.js

@@ -0,0 +1,13 @@
+'use strict';
+
+
+module.exports = app => {
+  const { router, controller } = app;
+  const profix = '/api/live/';
+  const vision = 'v0';
+  const index = 'patent';
+  const target = 'patentnotice';
+  const metaTime = app.middleware.createTime();
+  router.resources(target, `${profix}${vision}/${index}/${target}`, metaTime, controller[index][target]); // index、create、show、destroy
+  router.post(target, `${profix}${vision}/${index}/${target}/update/:id`, controller[index][target].update);
+};

+ 15 - 0
app/service/patent/patentanalysis.js

@@ -0,0 +1,15 @@
+'use strict';
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+const _ = require('lodash');
+const assert = require('assert');
+
+// 专利分析表-交底单
+class PatentanalysisService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'patentanalysis');
+    this.model = this.ctx.model.Patent.Patentanalysis;
+  }
+}
+
+module.exports = PatentanalysisService;

+ 15 - 0
app/service/patent/patentapply.js

@@ -0,0 +1,15 @@
+'use strict';
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+const _ = require('lodash');
+const assert = require('assert');
+
+// 专利申请表-审批单
+class PatentapplyService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'patentapply');
+    this.model = this.ctx.model.Patent.Patentapply;
+  }
+}
+
+module.exports = PatentapplyService;

+ 15 - 0
app/service/patent/patentassess.js

@@ -0,0 +1,15 @@
+'use strict';
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+const _ = require('lodash');
+const assert = require('assert');
+
+// 专利评估表
+class PatentassessService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'patentassess');
+    this.model = this.ctx.model.Patent.Patentassess;
+  }
+}
+
+module.exports = PatentassessService;

+ 18 - 0
app/service/patent/patentchat.js

@@ -0,0 +1,18 @@
+'use strict';
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+const { ObjectId } = require('mongoose').Types;
+const _ = require('lodash');
+const assert = require('assert');
+
+
+// 专利资讯服务聊天表
+class PatentchatService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'patentchat');
+    this.model = this.ctx.model.Patent.Patentchat;
+  }
+}
+
+module.exports = PatentchatService;
+

+ 18 - 0
app/service/patent/patentexamine.js

@@ -0,0 +1,18 @@
+'use strict';
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+const { ObjectId } = require('mongoose').Types;
+const _ = require('lodash');
+const assert = require('assert');
+
+
+// 审核通知
+class PatentexamineService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'patentexamine');
+    this.model = this.ctx.model.Patent.Patentexamine;
+  }
+}
+
+module.exports = PatentexamineService;
+

+ 15 - 0
app/service/patent/patentnotice.js

@@ -0,0 +1,15 @@
+'use strict';
+const { CrudService } = require('naf-framework-mongoose/lib/service');
+const { BusinessError, ErrorCode } = require('naf-core').Error;
+const _ = require('lodash');
+const assert = require('assert');
+
+// 通知
+class PatentnoticeService extends CrudService {
+  constructor(ctx) {
+    super(ctx, 'patentnotice');
+    this.model = this.ctx.model.Patent.Patentnotice;
+  }
+}
+
+module.exports = PatentnoticeService;