删除内容: - 前端: health/(67文件), ai/(2文件), Copilot, MediaPicker, 相关API/Store/Hook - 后端: wechat_handler, wechat_service, wechat_user entity, analytics handler, ai_workflow_seed - 配置: WechatConfig, AppConfig.wechat, AuthState wechat 字段 - 启动: 微信凭据检查块, ensure_ai_workflows() 调用 - 迁移: 新增 m20260613_000170_drop_wechat_users.rs - 脚本: api_test_health_alert.py, api_test_mp.py, mpsync.sh/ps1 - E2E: health-data page, flows/ 目录 保留: erp-core/auth/workflow/message/config/plugin + 基座前端 + 通用组件
69 lines
2.0 KiB
Rust
69 lines
2.0 KiB
Rust
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
use validator::Validate;
|
|
|
|
/// 插件信息响应
|
|
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
|
|
pub struct PluginResp {
|
|
pub id: Uuid,
|
|
pub name: String,
|
|
pub version: String,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub description: Option<String>,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub author: Option<String>,
|
|
pub status: String,
|
|
pub config: serde_json::Value,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub installed_at: Option<DateTime<Utc>>,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub enabled_at: Option<DateTime<Utc>>,
|
|
pub entities: Vec<PluginEntityResp>,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub permissions: Option<Vec<PluginPermissionResp>>,
|
|
pub record_version: i32,
|
|
}
|
|
|
|
/// 插件实体信息
|
|
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
|
pub struct PluginEntityResp {
|
|
pub name: String,
|
|
pub display_name: String,
|
|
pub table_name: String,
|
|
}
|
|
|
|
/// 插件权限信息
|
|
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
|
|
pub struct PluginPermissionResp {
|
|
pub code: String,
|
|
pub name: String,
|
|
pub description: String,
|
|
}
|
|
|
|
/// 插件健康检查响应
|
|
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
|
|
pub struct PluginHealthResp {
|
|
pub plugin_id: Uuid,
|
|
pub status: String,
|
|
pub details: serde_json::Value,
|
|
}
|
|
|
|
/// 更新插件配置请求
|
|
#[derive(Debug, Serialize, Deserialize, Validate, utoipa::ToSchema)]
|
|
pub struct UpdatePluginConfigReq {
|
|
pub config: serde_json::Value,
|
|
pub version: i32,
|
|
}
|
|
|
|
/// 插件列表查询参数
|
|
#[derive(Debug, Serialize, Deserialize, Validate, utoipa::IntoParams)]
|
|
pub struct PluginListParams {
|
|
pub page: Option<u64>,
|
|
pub page_size: Option<u64>,
|
|
#[validate(length(max = 20, message = "状态值无效"))]
|
|
pub status: Option<String>,
|
|
#[validate(length(max = 100, message = "搜索关键词过长"))]
|
|
pub search: Option<String>,
|
|
}
|