mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 12:52:26 +00:00
feat(workflow): 重构工作流编排界面,使用VueFlow替换LogicFlow
refactor: 统一详情接口权限标识从query改为detail feat(tenant): 为租户模型添加domain字段支持 fix(cron): 移除定时任务触发参数只读限制 perf(menu): 优化菜单权限标识注释说明 refactor(model): 为多个模型添加租户关联支持 style(main): 调整CSS导入顺序和格式 chore(package): 替换前端流程图库为@vue-flow系列 fix(token): 修正令牌详情接口权限标识 docs(sql): 更新菜单权限标识注释为query格式
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
from sqlalchemy import JSON, String, Integer
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.base_model import ModelMixin, UserMixin
|
||||
from app.core.base_model import ModelMixin, TenantMixin, UserMixin
|
||||
|
||||
|
||||
class McpModel(ModelMixin, UserMixin):
|
||||
class McpModel(ModelMixin, TenantMixin, UserMixin):
|
||||
"""
|
||||
MCP 服务器表
|
||||
MCP类型:
|
||||
@@ -15,7 +15,7 @@ class McpModel(ModelMixin, UserMixin):
|
||||
"""
|
||||
__tablename__: str = 'app_ai_mcp'
|
||||
__table_args__: dict[str, str] = ({'comment': 'MCP 服务器表'})
|
||||
__loader_options__: list[str] = ["created_by", "updated_by"]
|
||||
__loader_options__: list[str] = ["created_by", "updated_by", "tenant"]
|
||||
|
||||
name: Mapped[str] = mapped_column(String(50), comment='MCP 名称')
|
||||
type: Mapped[int] = mapped_column(Integer, default=0, comment='MCP 类型(0:stdio 1:sse)')
|
||||
|
||||
@@ -27,7 +27,7 @@ JobRouter = APIRouter(route_class=OperationLogRoute, prefix="/job", tags=["定
|
||||
@JobRouter.get("/detail/{id}", summary="获取定时任务详情", description="获取定时任务详情")
|
||||
async def get_obj_detail_controller(
|
||||
id: int = Path(..., description="定时任务ID"),
|
||||
auth: AuthSchema = Depends(AuthPermission(["module_application:job:query"]))
|
||||
auth: AuthSchema = Depends(AuthPermission(["module_application:job:detail"]))
|
||||
) -> JSONResponse:
|
||||
"""
|
||||
获取定时任务详情
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
from sqlalchemy import Boolean, String, Integer, Text, ForeignKey
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
from app.core.base_model import ModelMixin, UserMixin
|
||||
from app.core.base_model import ModelMixin, TenantMixin, UserMixin
|
||||
|
||||
|
||||
class JobModel(ModelMixin, UserMixin):
|
||||
class JobModel(ModelMixin, TenantMixin, UserMixin):
|
||||
"""
|
||||
定时任务调度表
|
||||
- 0: 运行中
|
||||
@@ -14,7 +14,7 @@ class JobModel(ModelMixin, UserMixin):
|
||||
"""
|
||||
__tablename__: str = 'app_job'
|
||||
__table_args__: dict[str, str] = ({'comment': '定时任务调度表'})
|
||||
__loader_options__: list[str] = ["job_logs", "created_by", "updated_by"]
|
||||
__loader_options__: list[str] = ["job_logs", "created_by", "updated_by", "tenant"]
|
||||
|
||||
name: Mapped[str | None] = mapped_column(String(64), nullable=True, default='', comment='任务名称')
|
||||
jobstore: Mapped[str | None] = mapped_column(String(64), nullable=True, default='default', comment='存储器')
|
||||
@@ -36,13 +36,13 @@ class JobModel(ModelMixin, UserMixin):
|
||||
)
|
||||
|
||||
|
||||
class JobLogModel(ModelMixin):
|
||||
class JobLogModel(ModelMixin, TenantMixin):
|
||||
"""
|
||||
定时任务调度日志表
|
||||
"""
|
||||
__tablename__: str = 'app_job_log'
|
||||
__table_args__: dict[str, str] = ({'comment': '定时任务调度日志表'})
|
||||
__loader_options__: list[str] = ["job"]
|
||||
__loader_options__: list[str] = ["job", "tenant"]
|
||||
|
||||
job_name: Mapped[str] = mapped_column(String(64), nullable=False, comment='任务名称')
|
||||
job_group: Mapped[str] = mapped_column(String(64), nullable=False, comment='任务组名')
|
||||
|
||||
@@ -25,7 +25,7 @@ MyAppRouter = APIRouter(route_class=OperationLogRoute, prefix="/myapp", tags=["
|
||||
@MyAppRouter.get("/detail/{id}", summary="获取应用详情", description="获取应用详情")
|
||||
async def get_obj_detail_controller(
|
||||
id: int = Path(..., description="应用ID"),
|
||||
auth: AuthSchema = Depends(AuthPermission(["module_application:myapp:query"]))
|
||||
auth: AuthSchema = Depends(AuthPermission(["module_application:myapp:detail"]))
|
||||
) -> JSONResponse:
|
||||
"""
|
||||
获取应用详情
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
from sqlalchemy import String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.base_model import ModelMixin, UserMixin
|
||||
from app.core.base_model import ModelMixin, TenantMixin, UserMixin
|
||||
|
||||
|
||||
class ApplicationModel(ModelMixin, UserMixin):
|
||||
class ApplicationModel(ModelMixin, TenantMixin, UserMixin):
|
||||
"""
|
||||
应用系统表
|
||||
"""
|
||||
__tablename__: str = 'app_myapp'
|
||||
__table_args__: dict[str, str] = ({'comment': '应用系统表'})
|
||||
__loader_options__: list[str] = ["created_by", "updated_by"]
|
||||
__loader_options__: list[str] = ["created_by", "updated_by", "tenant"]
|
||||
|
||||
name: Mapped[str] = mapped_column(String(64), nullable=False, comment='应用名称')
|
||||
access_url: Mapped[str] = mapped_column(String(500), nullable=False, comment='访问地址')
|
||||
|
||||
Reference in New Issue
Block a user