feat: 添加前端页面和业务说明书

refactor(server): 重构服务层代码结构
feat(server): 添加基础设施、跨境电商、AI决策等核心服务
docs: 完善前端业务说明书和开发进度文档
style: 格式化代码和文档
This commit is contained in:
2026-03-18 19:12:38 +08:00
parent c932a67be2
commit 6d0d2b6157
140 changed files with 23859 additions and 5833 deletions

46
server/src/types/data.ts Normal file
View File

@@ -0,0 +1,46 @@
/**
* 数据配置
*/
export interface DataConfig {
id: string;
name: string;
type: string;
location: string;
description?: string;
backupPolicy?: string;
retentionPolicy?: string;
encryptionEnabled?: boolean;
compressionEnabled?: boolean;
}
/**
* 数据状态
*/
export interface DataStatus {
status: 'ACTIVE' | 'INACTIVE' | 'RESTORED' | 'ERROR' | 'UNKNOWN';
lastUpdated: Date;
size: number;
}
/**
* 数据备份
*/
export interface DataBackup {
id: string;
dataId: string;
name: string;
timestamp: Date;
size: number;
status: 'PENDING' | 'COMPLETED' | 'FAILED';
}
/**
* 数据恢复
*/
export interface DataRestore {
id: string;
backupId: string;
timestamp: Date;
status: 'PENDING' | 'COMPLETED' | 'FAILED';
message?: string;
}

View File

@@ -0,0 +1,44 @@
/**
* 消息配置
*/
export interface MessageConfig {
id: string;
name: string;
type: 'QUEUE' | 'TOPIC' | 'STREAM';
maxSize?: number;
retentionPeriod?: number;
description?: string;
}
/**
* 消息状态
*/
export interface MessageStatus {
status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'REJECTED' | 'ERROR';
lastUpdated: Date;
}
/**
* 消息队列
*/
export interface MessageQueue {
id: string;
name: string;
type: 'QUEUE' | 'TOPIC' | 'STREAM';
maxSize: number;
retentionPeriod: number;
created: Date;
messages: string[];
}
/**
* 消息
*/
export interface Message {
id: string;
queueId: string;
payload: any;
status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'REJECTED' | 'ERROR';
created: Date;
updated: Date;
}

View File

@@ -0,0 +1,41 @@
/**
* 监控配置
*/
export interface MonitoringConfig {
id: string;
name: string;
type: 'CPU' | 'MEMORY' | 'DISK' | 'NETWORK' | 'SERVICE' | 'CUSTOM';
threshold: number;
description?: string;
checkInterval?: number;
alertEnabled?: boolean;
alertThreshold?: number;
}
/**
* 监控状态
*/
export interface MonitoringStatus {
status: 'NORMAL' | 'ALERT' | 'ERROR' | 'UNKNOWN';
lastChecked: Date;
value: number;
threshold: number;
}
/**
* 告警状态
*/
export type AlertStatus = 'ACTIVE' | 'ACKNOWLEDGED' | 'RESOLVED' | 'ESCALATED';
/**
* 告警
*/
export interface Alert {
id: string;
configId: string;
severity: 'INFO' | 'WARNING' | 'ERROR' | 'CRITICAL';
message: string;
status: AlertStatus;
created: Date;
updated: Date;
}

View File

@@ -0,0 +1,44 @@
/**
* 安全配置
*/
export interface SecurityConfig {
id: string;
name: string;
type: 'AUTH' | 'ENCRYPTION' | 'ACCESS' | 'AUDIT';
description?: string;
settings?: Record<string, any>;
enabled?: boolean;
}
/**
* 安全状态
*/
export interface SecurityStatus {
status: 'ACTIVE' | 'INACTIVE' | 'ERROR' | 'UNKNOWN';
lastUpdated: Date;
complianceLevel: 'COMPLIANT' | 'NON_COMPLIANT' | 'PARTIALLY_COMPLIANT' | 'UNKNOWN';
}
/**
* 合规检查
*/
export interface ComplianceCheck {
id: string;
name: string;
type: 'SECURITY' | 'PRIVACY' | 'REGULATORY' | 'PERFORMANCE';
severity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
description?: string;
frequency?: string;
}
/**
* 合规检查结果
*/
export interface ComplianceResult {
checkId: string;
target: string;
status: 'COMPLIANT' | 'NON_COMPLIANT' | 'ERROR';
message: string;
timestamp: Date;
details: Record<string, any>;
}

View File

@@ -0,0 +1,33 @@
/**
* 服务配置
*/
export interface ServiceConfig {
id: string;
name: string;
type: string;
version: string;
description?: string;
dependencies?: string[];
startupOrder?: number;
autoStart?: boolean;
maxRestarts?: number;
restartDelay?: number;
}
/**
* 服务状态
*/
export interface ServiceStatus {
status: 'RUNNING' | 'STOPPED' | 'ERROR' | 'UNKNOWN';
lastCheck: Date;
}
/**
* 服务健康检查结果
*/
export interface ServiceHealthCheck {
serviceId: string;
status: 'HEALTHY' | 'UNHEALTHY' | 'ERROR';
message: string;
timestamp: Date;
}