提交1 bmad搭建与项目启动 - ok

This commit is contained in:
2025-10-17 17:24:56 +08:00
commit ec58562661
686 changed files with 149750 additions and 0 deletions

41
src/types/message.ts Normal file
View File

@@ -0,0 +1,41 @@
// 消息中心类型定义
// 消息类型
export type MessageType = 'sms' | 'email' | 'internal' | 'push';
// 消息状态
export type MessageStatus = 'pending' | 'sent' | 'failed' | 'read';
// 消息模板
export interface MessageTemplate {
id: string;
code: string;
name: string;
type: MessageType;
subject?: string;
content: string;
variables: string[]; // 变量列表,如 ['username', 'code', 'time']
isActive: boolean;
description?: string;
createdAt: string;
updatedAt: string;
createdBy?: string;
}
// 消息日志
export interface MessageLog {
id: string;
templateId?: string;
templateName?: string;
type: MessageType;
recipient: string; // 接收人(手机号/邮箱/用户ID
recipientName?: string;
subject?: string;
content: string;
status: MessageStatus;
sentTime: string;
readTime?: string;
failReason?: string;
retryCount: number;
variables?: Record<string, any>;
}