添加项目文件。
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using MessageService.Domain.Enums;
|
||||
|
||||
namespace MessageService.WebApi.Application.Dtos
|
||||
{
|
||||
public record MessageResponse
|
||||
{
|
||||
public Guid Id { get; init; }
|
||||
public Guid ClientMsgId { get; init; }
|
||||
public ChatType ChatType { get; init; }
|
||||
public MessageType MsgType { get; init; }
|
||||
public Guid SenderId { get; init; }
|
||||
public Guid TargetId { get; init; }
|
||||
public MessageState State { get; init; }
|
||||
public string StreamKey { get; init; }
|
||||
public long SequenceId { get; init; }
|
||||
public DateTimeOffset CreationTime { get; init; }
|
||||
|
||||
// 关键:展开 Content
|
||||
public MessageContentResponse Content { get; init; }
|
||||
}
|
||||
|
||||
public record MessageContentResponse(
|
||||
string Fallback,
|
||||
object Body, // 已经是反序列化后的具体对象
|
||||
Dictionary<string, string> Ext,
|
||||
QuoteInfoResponse? Quote
|
||||
);
|
||||
|
||||
public record QuoteInfoResponse(
|
||||
Guid MessageId,
|
||||
Guid SenderId,
|
||||
string SenderName,
|
||||
MessageType MessageType,
|
||||
string Preview
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user