using System;
using System.Collections.Generic;
namespace LeanCloud.Realtime {
///
/// 消息基类
///
public abstract class LCIMMessage {
///
/// 消息所在对话 Id
///
public string ConversationId {
get; set;
}
///
/// 消息 Id
///
public string Id {
get; set;
}
///
/// 发送者 Id
///
public string FromClientId {
get; set;
}
///
/// 发送时间戳
///
public long SentTimestamp {
get; internal set;
}
///
/// 发送时间
///
public DateTime SentAt {
get {
return DateTimeOffset.FromUnixTimeMilliseconds(SentTimestamp)
.LocalDateTime;
}
}
///
/// 送达时间戳
///
public long DeliveredTimestamp {
get; internal set;
}
///
/// 送达时间
///
public DateTime DeliveredAt {
get {
return DateTimeOffset.FromUnixTimeMilliseconds(DeliveredTimestamp)
.LocalDateTime;
}
}
///
/// 已读时间戳
///
public long ReadTimestamp {
get; internal set;
}
///
/// 已读时间
///
public DateTime ReadAt {
get {
return DateTimeOffset.FromUnixTimeMilliseconds(ReadTimestamp)
.LocalDateTime;
}
}
///
/// 修改时间戳
///
public long PatchedTimestamp {
get; internal set;
}
///
/// 修改时间
///
public DateTime PatchedAt {
get {
return DateTimeOffset.FromUnixTimeMilliseconds(PatchedTimestamp)
.LocalDateTime;
}
}
///
/// 提醒成员 Id 列表
///
public List MentionIdList {
get; set;
}
///
/// 是否提醒所有人
///
public bool MentionAll {
get; set;
}
///
/// 是否提醒当前用户
///
public bool Mentioned {
get; internal set;
}
///
/// 是否是暂态消息
///
public bool IsTransient {
get; internal set;
}
internal LCIMMessage() {
}
}
}