mcp service add sort and category_id

This commit is contained in:
Liujian committed 2026-03-11 10:56:54 +08:00
1 parent 687949beb2
commit 2ea41dfb75
2 files changed
+4 -1

No files matched your search

@@ -44,7 +44,8 @@ class McpServiceRepository:
existing_service = query.first()
if not existing_service:
raise ValueError("Service not found")
existing_service.category_id = mcp_service.category_id or ""
existing_service.name = mcp_service.name
existing_service.slug_name = mcp_service.slug_name
existing_service.short_description = mcp_service.short_description
+2
View File
@@ -36,6 +36,8 @@ class McpService(Base):
enabled: Mapped[int] = mapped_column(Integer, nullable=True, comment="Service status: 0=disabled, 1=enabled")
tags: Mapped[str] = mapped_column(String, nullable=True, comment="Tags")
service_type: Mapped[str] = mapped_column(String(255), nullable=True, comment="Service type",default="openapi")
category_id: Mapped[str] = mapped_column(String(36), nullable=True, comment="Category ID")
sort: Mapped[int] = mapped_column(Integer, nullable=True,default=0, comment="Sort order")
created_at: Mapped[datetime] = mapped_column(
DateTime,
nullable=True,