IM/backend/IM_API/Models/Conversation.cs
nanxun 58bc8b4b5a 前端:
1、优化消息排序逻辑
2、新增加载历史消息
3、修复已知问题
后端:
1、优化消息排序逻辑
2、增加用户信息缓存机制
3、修改日期类型为DateTimeOffset改善时区信息丢失问题
3、修复了已知问题
数据库:
1、新增SequenceId字段用于消息排序
2、新增ClientMsgId字段用于客户端消息回执
2026-02-07 22:37:56 +08:00

52 lines
1.1 KiB
C#
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.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace IM_API.Models;
public partial class Conversation
{
public int Id { get; set; }
/// <summary>
/// 用户
/// </summary>
public int UserId { get; set; }
/// <summary>
/// 对方ID群聊为群聊ID单聊为单聊ID
/// </summary>
public int TargetId { get; set; }
/// <summary>
/// 最后一条未读消息ID
/// </summary>
public long? LastReadSequenceId { get; set; }
/// <summary>
/// 未读消息数
/// </summary>
public int UnreadCount { get; set; }
public ChatType ChatType { get; set; }
/// <summary>
/// 消息推送唯一标识符
/// </summary>
public string StreamKey { get; set; } = null!;
/// <summary>
/// 最后一条最新消息
/// </summary>
public string LastMessage { get; set; } = null!;
/// <summary>
/// 最后一条消息发送时间
/// </summary>
[Column(TypeName = "datetimeoffset")]
public DateTimeOffset LastMessageTime { get; set; }
public virtual User User { get; set; } = null!;
}