Files
WeFlow/src/types/models.ts

59 lines
1.2 KiB
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 interface ChatSession {
username: string
type: number
unreadCount: number
summary: string
sortTimestamp: number // 用于排序
lastTimestamp: number // 用于显示时间
lastMsgType: number
displayName?: string
avatarUrl?: string
}
// 联系人
export interface Contact {
id: number
username: string
localType: number
alias: string
remark: string
nickName: string
bigHeadUrl: string
smallHeadUrl: string
}
// 消息
export interface Message {
localId: number
serverId: number
localType: number
createTime: number
sortSeq: number
isSend: number | null
senderUsername: string | null
parsedContent: string
rawContent?: string // 原始消息内容(保留用于兼容)
content?: string // 原始消息内容XML
imageMd5?: string
imageDatName?: string
emojiCdnUrl?: string
emojiMd5?: string
voiceDurationSeconds?: number
videoMd5?: string
// 引用消息
quotedContent?: string
quotedSender?: string
}
// 分析数据
export interface AnalyticsData {
totalMessages: number
totalDays: number
myMessages: number
otherMessages: number
messagesByType: Record<number, number>
messagesByHour: number[]
messagesByDay: number[]
}