1、优化消息排序逻辑 2、新增加载历史消息 3、修复已知问题 后端: 1、优化消息排序逻辑 2、增加用户信息缓存机制 3、修改日期类型为DateTimeOffset改善时区信息丢失问题 3、修复了已知问题 数据库: 1、新增SequenceId字段用于消息排序 2、新增ClientMsgId字段用于客户端消息回执
34 lines
854 B
C#
34 lines
854 B
C#
using IM_API.Dtos.User;
|
|
using IM_API.Models;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace IM_API.Dtos.Friend
|
|
{
|
|
public record FriendInfoDto
|
|
{
|
|
public int Id { get; init; }
|
|
|
|
public int UserId { get; init; }
|
|
|
|
public int FriendId { get; init; }
|
|
|
|
public FriendStatus StatusEnum { get; init; }
|
|
|
|
public DateTimeOffset Created { get; init; }
|
|
|
|
public string RemarkName { get; init; } = string.Empty;
|
|
|
|
public string? Avatar { get; init; }
|
|
public UserInfoDto UserInfo { get; init; }
|
|
}
|
|
|
|
public record FriendRequestHandleDto
|
|
{
|
|
[Required(ErrorMessage = "操作必填")]
|
|
public HandleFriendRequestAction Action { get; init; }
|
|
|
|
[StringLength(20, ErrorMessage = "备注名最大20个字符")]
|
|
public string? RemarkName { get; init; }
|
|
}
|
|
}
|