import { moduleListSchema, moduleCreateSchema, moduleUpdateSchema } from '#schema/module.schema'; import { moduleListService, moduleCreateService, moduleUpdateService } from '#services/module/module.service'; export default async function moduleRoute(fastify, options) { // 1. 获取系统模块列表 23-04/23 fastify.get('/', { schema: moduleListSchema }, moduleListService); // 2. 新增系统模块 fastify.post('/', { schema: moduleCreateSchema }, moduleCreateService); // 3. 编辑系统模块 fastify.patch('/:id', { schema: moduleUpdateSchema }, moduleUpdateService); // 4. 删除系统模块 // 5. 启用禁用模块 // 6. 排序 }