Files
smart-crop-ui/src/types/message.ts

42 lines
946 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 消息中心类型定义
// 消息类型
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>;
}