IM/backend/IM_API/Dtos/ConversationDto.cs
nanxun e7dbb651a2 前端:
1、会话列表、消息界面展示与后端打通
后端:
1、修复会话和消息服务现存问题
2、会话对象不再返回Message对象,而是使用MessageBaseDto替代
3、修改查询会话列表和会话信息的逻辑
4、新增消息列表查询
文档:
后端代码规范文档新增从数据库同步到模型的命令
2026-01-18 22:32:55 +08:00

52 lines
1.2 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 IM_API.Models;
namespace IM_API.Dtos
{
public class ConversationDto
{
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 int? LastReadMessageId { get; set; }
/// <summary>
/// 未读消息数
/// </summary>
public int UnreadCount { get; set; }
public int ChatType { get; set; }
/// <summary>
/// 最后一条最新消息
/// </summary>
public string LastMessage { get; set; } = null!;
/// <summary>
/// 最后一条消息时间
/// </summary>
public DateTime? DateTime { get; set; } = null;
/// <summary>
/// 对方昵称
/// </summary>
public string TargetName { get; set; }
/// <summary>
/// 对方头像
/// </summary>
public string? TargetAvatar { get; set; }
public MessageBaseDto? LastReadMessage { get; set; }
}
}