Files
wecom_it_smart_desk/docs/02-技术文档/技术架构/designdocs/class.mmd
T

79 lines
2.0 KiB
Plaintext
Raw Normal View History

classDiagram
direction LR
class ConfigChangeLog {
+String id
+String config_key
+Text old_value
+Text new_value
+String changed_by
+DateTime changed_at
}
class AuditLog {
+String id
+String employee_id
+String action
+String resource
+String resource_id
+JSON details
+String result
+String ip_address
+Text user_agent
+DateTime created_at
}
class RuntimeLogEntry {
+String timestamp
+String level
+String logger
+String message
+String module
+String function
+int line
+String request_id
+String user_id
}
class ConfigHistoryItem {
+String id
+String config_key
+String old_value
+String new_value
+String changed_by
+String changed_by_name
+DateTime changed_at
}
class AdminApi {
+GET /system-logs
}
class AuditApi {
+GET /audit-logs
}
class RuntimeApi {
+GET /runtime-logs
}
class AdminService {
+get_system_logs(db, config_key, changed_by, from, to, page, page_size)
}
class AuditLogService {
+list_audit_logs(db, employee_id, action, resource, from, to, page, page_size)
}
class RuntimeLogService {
+read_runtime_logs(dir, level, from, to, keyword, page, page_size)
+build_runtime_log_stream(dir, level, from, to, keyword)
}
class RuntimeLogStore {
<<filesystem>>
+RUNTIME_LOG_DIR/*.log
}
AdminApi ..> AdminService : 调用
AuditApi ..> AuditLogService : 调用
RuntimeApi ..> RuntimeLogService : 调用
AdminService ..> ConfigChangeLog : SELECT
AuditLogService ..> AuditLog : SELECT
RuntimeLogService ..> RuntimeLogStore : 读文件
ConfigHistoryItem <|.. ConfigChangeLog : 映射
RuntimeLogEntry <|.. RuntimeLogStore : 逐行解析