53 lines
1.7 KiB
C#
53 lines
1.7 KiB
C#
using Chtn.CSharp.SDK.Models.Common;
|
|
using Newtonsoft.Json;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Chtn.CSharp.SDK.Models.Chat
|
|
{
|
|
public class Chat
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
[JsonProperty("displayName")] public string DisplayName { get; set; }
|
|
[JsonProperty("latestMessage")] public LatestMessage Latest { get; set; }
|
|
[JsonProperty("icon")] public string Icon { get; set; }
|
|
[JsonProperty("isGroup")] public bool IsGroup { get; set; }
|
|
[JsonProperty("unreadCount")] public int UnreadCount { get; set; }
|
|
}
|
|
|
|
public class Message
|
|
{
|
|
[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 LatestMessage
|
|
{
|
|
[JsonProperty("message")] public string Message { get; set; }
|
|
[JsonProperty("msgid")] public string MsgId { get; set; }
|
|
}
|
|
|
|
public class GetChatsReq { }
|
|
|
|
public class StartNewReq
|
|
{
|
|
[JsonProperty("targetUserId")] public string TargetUserId { get; set; }
|
|
}
|
|
|
|
public class ToggleChatMuteReq
|
|
{
|
|
[JsonProperty("chatid")] public string ChatId { get; set; }
|
|
}
|
|
|
|
public class GetAvailabilityReq
|
|
{
|
|
[JsonProperty("userIds")] public List<string> UserIds { get; set; }
|
|
}
|
|
|
|
public class GetAvailabilityResp
|
|
{
|
|
[JsonProperty("availability")] public Dictionary<string, string> Availability{ get; set; }
|
|
}
|
|
} |