120 lines
3.5 KiB
C#
120 lines
3.5 KiB
C#
using Chtn.CSharp.SDK.Models.Common;
|
|
using Newtonsoft.Json;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Chtn.CSharp.SDK.Models.Chat.DM
|
|
{
|
|
public class DmMessage
|
|
{
|
|
[JsonProperty("msgid")] public string MsgId { get; set; }
|
|
[JsonProperty("author")] public string Author { get; set; }
|
|
[JsonProperty("message")] public string Content { get; set; }
|
|
[JsonProperty("sent_at")] public TimeStamp SentAt { get; set; }
|
|
[JsonProperty("files")] public List<Attachment> Files { get; set; }
|
|
}
|
|
|
|
public class PinnedMessage : DmMessage { }
|
|
|
|
public class GetMessagesReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("limit")] public string Limit { get; set; }
|
|
}
|
|
|
|
public class GetMessagePosReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
}
|
|
|
|
public class GetPinnedMessagesReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
}
|
|
|
|
public class EditMessageReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("limit")] public string Limit { get; set; }
|
|
[JsonProperty("content")] public string Content { get; set; }
|
|
}
|
|
|
|
public class DeleteMessageReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
}
|
|
|
|
public class FinishMessageReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
}
|
|
|
|
public class ReadMessagesReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
}
|
|
|
|
public class PinMessageReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
}
|
|
|
|
public class UnpinMessageReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
}
|
|
|
|
public class DeleteMessagesReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("userId")] public string UserId { get; set; }
|
|
}
|
|
|
|
public class JoinWsRoomReq
|
|
{
|
|
[JsonProperty("connId")] public string ConnId { get; set; }
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
}
|
|
|
|
public class GetMessagePosResp
|
|
{
|
|
[JsonProperty("pos")] public int Position { get; set; }
|
|
}
|
|
|
|
public class WSMessageDeletedPayload
|
|
{
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
}
|
|
|
|
public class WSMessageEditedPayload
|
|
{
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
[JsonProperty("content")] public string Content { get; set; }
|
|
}
|
|
|
|
public class WSNewMessagePayload
|
|
{
|
|
[JsonProperty("message")] public DmMessage Message { get; set; }
|
|
}
|
|
|
|
public class WSMessagePinnedPayload
|
|
{
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
}
|
|
|
|
public class WSMessagesReadPayload
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("readerId")] public string ReaderId { get; set; }
|
|
}
|
|
|
|
public class WSMessageUnpinnedPayload
|
|
{
|
|
[JsonProperty("msgid")] public string MessageId { get; set; }
|
|
}
|
|
} |