'use strict'; const patentSolution = require('../controllers/patentSolution'); module.exports = function (app, router, opts) { const { middlewares: { auth ,resolveExternalUserId} } = app; router.get('/patent-solutions',resolveExternalUserId, patentSolution.getPatentSolutionList, { content: '获取专利方案列表', visible: true }); router.post('/patent-solutions',resolveExternalUserId, patentSolution.createPatentSolution, { content: '创建专利方案', visible: true }); router.put('/patent-solutions/:solutionId', patentSolution.modifyPatentSolution, { content: '修改专利方案', visible: true }); router.delete('/patent-solutions/:solutionId', patentSolution.delPatentSolution, { content: '删除专利方案', visible: true }); router.get('/patent-solutions/:solutionId/base-fields', patentSolution.getBaseFields, { content: '获取基础信息字段', visible: true }); router.put('/patent-solutions/:solutionId/base-fields', patentSolution.saveBaseFields, { content: '保存基础信息字段', visible: true }); router.post('/patent-solutions/:solutionId/base-fields/apply-ai', patentSolution.applyAiFields, { content: '一键应用AI字段', visible: true }); router.post('/patent-solutions/:solutionId/generateChapters', patentSolution.generateChapters, { content: '生成预览目录', visible: true }); router.post('/patent-solutions/:solutionId/sortChapters', patentSolution.sortChapters, { content: '整理目录', visible: true }); router.post('/patent-solutions/:solutionId/createChapters', patentSolution.createChapters, { content: '确认目录', visible: true }); router.post('/patent-solutions/:solutionId/startGenerateContent', patentSolution.startGenerateContent, { content: '开始生成正文', visible: true }); router.get('/patent-solutions/:solutionId/chapters', patentSolution.getPatentChapters, { content: '获取目录章节', visible: true }); router.post('/patent-solutions/:solutionId/chapters', patentSolution.addPatentChapters, { content: '新增章节', visible: true }); router.put('/patent-solutions/:solutionId/chapters/:chapterId', patentSolution.modifyPatentChapters, { content: '修改章节', visible: true }); router.delete('/patent-solutions/:solutionId/chapters/:chapterId', patentSolution.delPatentChapters, { content: '删除章节', visible: true }); router.post('/patent-solutions/:solutionId/chapters/:chapterId/reWrite', patentSolution.reWriteChapterContent, { content: '重编章节', visible: true }); router.get('/patent-solutions/:solutionId/chapters/:chapterId/versions', patentSolution.getChapterVersions, { content: '章节版本列表', visible: true }); router.post('/patent-solutions/:solutionId/chapters/:chapterId/saveEdit', patentSolution.saveChapterEdit, { content: '保存章节编辑', visible: true }); router.post('/patent-solutions/:solutionId/chapters/:chapterId/versions/:version/restore', patentSolution.restoreChapterVersion, { content: '恢复章节历史版本', visible: true }); router.get('/patent-solutions/:solutionId/doc-versions', patentSolution.getDocVersions, { content: '正文版本列表', visible: true }); router.post('/patent-solutions/:solutionId/reWriteDoc', patentSolution.reWriteDoc, { content: '重编正文', visible: true }); router.post('/patent-solutions/:solutionId/saveDocEdit', patentSolution.saveDocEdit, { content: '保存正文编辑', visible: true }); router.post('/patent-solutions/:solutionId/doc-versions/:version/restore', patentSolution.restoreDocVersion, { content: '恢复正文历史版本', visible: true }); router.post('/patent-solutions/:solutionId/chat', patentSolution.patentChat, { content: '专利方案问答', visible: true }); router.get('/patent-solutions/:solutionId/chat-records', patentSolution.getChatRecords, { content: '专利方案问答记录', visible: true }); };