Message.ts 539 B

1234567891011121314151617181920212223242526
  1. import type Extend from "@/mode/Extend";
  2. interface Message {
  3. //消息id,雪花id,有序增长
  4. id?: string;
  5. //消息文件类型 文本|附件|ping|语音
  6. messageType: string;
  7. //聊天室id
  8. chatId: string;
  9. //消息发送人
  10. fromId: string;
  11. //是否是本人
  12. mine?: boolean;
  13. //消息内容
  14. content: string;
  15. //消息时间
  16. timestamp?: number;
  17. //本地消息时间
  18. localtime?: number;
  19. //消息类型:私聊|群聊
  20. type: string;
  21. result?: boolean;
  22. //扩展
  23. extend?: Extend;
  24. }
  25. export default Message;