mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 12:52:26 +00:00
- 将系统管理、监控管理、通用、资源管理、示例、应用及AI模块路由封装为统一Router - 精简顶层路由注册逻辑,提升维护性和可读性 - 按模块重构AI、应用、通用、示例、监控、资源、系统子模块初始化文件 - 采用SQLAlchemy 2.0新语法重写工单和版本模型,兼容MySQL和PostgreSQL - 完善工单和版本模块CRUD、服务、参数校验、Schema和控制器代码 - 增加工单和版本的权限验证、日志记录及分页支持 - 统一使用pydantic的新配置类ConfigDict增强Schema定义 - 删除废弃的工单和版本旧代码,提升代码一致性和健壮性
37 lines
793 B
Python
37 lines
793 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from fastapi import APIRouter
|
|
|
|
# 系统管理模块
|
|
from .module_system import SystemRouter
|
|
|
|
# 监控管理模块
|
|
from .module_monitor import MonitorRouter
|
|
|
|
# 通用模块
|
|
from .module_common import CommonRouter
|
|
|
|
# 资源管理模块
|
|
from .module_resource import ResourceRouter
|
|
|
|
# 示例模块
|
|
from .module_example import ExampleRouter
|
|
|
|
# 应用模块
|
|
from .module_application import ApplicationRouter
|
|
|
|
# AI模块
|
|
from .module_ai import AIRouter
|
|
|
|
|
|
# 创建主路由
|
|
router = APIRouter()
|
|
|
|
# 注册各模块路由
|
|
router.include_router(SystemRouter)
|
|
router.include_router(MonitorRouter)
|
|
router.include_router(CommonRouter)
|
|
router.include_router(ResourceRouter)
|
|
router.include_router(ExampleRouter)
|
|
router.include_router(ApplicationRouter)
|
|
router.include_router(AIRouter) |