Files
FastapiAdmin/backend/app/api/v1/module_application/ai/model.py
T
zhangtao 780e02b9de feat: 新增刷新缓存功能并优化系统初始化
refactor: 重构模型加载选项和CRUD预加载逻辑

fix: 修复日期范围查询格式问题

style: 优化前端组件样式和布局

perf: 提升字典数据更新性能

docs: 更新注释和文档说明

chore: 清理无用文件和代码

test: 更新测试用例

build: 添加vue-json-pretty依赖

ci: 优化初始化脚本和事务处理
2025-10-27 02:33:50 +08:00

24 lines
997 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 服务器表'})
__loader_options__ = ["creator"]
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 环境变量')