Files
FastapiAdmin/backend/app/api/v1/module_application/ai/model.py
T
zhangtao d943d295d0 refactor(module): 重构模块结构,将示例模块和AI模块迁移至应用模块
- 删除原有的示例模块(module_example)和AI模块(module_ai)
- 在应用模块(module_application)下新增AI子模块和示例子模块
- 更新相关路由配置,移除不再使用的模块路由
- 调整定时任务模块从监控模块迁移至应用模块
- 更新前端API路径和组件文件结构
- 修正数据库表名前缀,统一使用'app_'作为应用模块表前缀
2025-10-05 12:24:40 +08:00

23 lines
960 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
from typing import Optional, Dict, Any
from sqlalchemy import JSON, String, Integer
from sqlalchemy.orm import Mapped, mapped_column
from app.core.base_model import CreatorMixin
class McpModel(CreatorMixin):
"""
MCP 服务器表
"""
__tablename__ = 'app_ai_mcp'
__table_args__ = ({'comment': 'MCP 服务器表'})
name: Mapped[str] = mapped_column(String(50), unique=True, comment='MCP 名称')
type: Mapped[int] = mapped_column(Integer, default=0, comment='MCP 类型(0:stdio 1:sse')
url: Mapped[Optional[str]] = mapped_column(String(255), default=None, comment='远程 SSE 地址')
command: Mapped[Optional[str]] = mapped_column(String(255), default=None, comment='MCP 命令')
args: Mapped[Optional[str]] = mapped_column(String(255), default=None, comment='MCP 命令参数')
env: Mapped[Optional[Dict[str, Any]]] = mapped_column(JSON(), default=None, comment='MCP 环境变量')