添加项目文件。
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using MessageService.Domain.Enums;
|
||||
|
||||
namespace MessageService.WebApi.Application.Message
|
||||
{
|
||||
public record SendMsgCommand
|
||||
{
|
||||
// 核心区别:Command 必须包含 SenderId,这是从后端 Token 解析出来的
|
||||
public Guid SenderId { get; init; }
|
||||
|
||||
public Guid TargetId { get; init; }
|
||||
public ChatType ChatType { get; init; }
|
||||
public MessageType MsgType { get; init; }
|
||||
public Guid ClientMsgId { get; init; }
|
||||
|
||||
public Guid? QuoteMessageId { get; init; }
|
||||
public Dictionary<string, string>? Ext { get; init; }
|
||||
|
||||
// 拍扁后的参数,方便 Service 直接调用工厂方法
|
||||
public string? Text { get; init; }
|
||||
public string? Url { get; init; }
|
||||
public int? Width { get; init; }
|
||||
public int? Height { get; init; }
|
||||
public string? Thumb { get; init; }
|
||||
public int? Duration { get; init; }
|
||||
|
||||
public SendMsgCommand(Guid senderId, Guid targetId, ChatType chatType, MessageType msgType, Guid clientMsgId, Guid? quoteMessageId, Dictionary<string, string>? ext, string? text, string? url, int? width, int? height, string? thumb, int? duration)
|
||||
{
|
||||
SenderId = senderId;
|
||||
TargetId = targetId;
|
||||
ChatType = chatType;
|
||||
MsgType = msgType;
|
||||
ClientMsgId = clientMsgId;
|
||||
QuoteMessageId = quoteMessageId;
|
||||
Ext = ext;
|
||||
Text = text;
|
||||
Url = url;
|
||||
Width = width;
|
||||
Height = height;
|
||||
Thumb = thumb;
|
||||
Duration = duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user