using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LearningOfficer.OA.Common.Dtos.TencentIM { public class MsgContent { /// /// 消息内容。当接收方为 iOS 或 Android 后台在线时,作为离线推送的文本展示。 /// public string Text { get; set; } } public class MsgBody { /// /// 消息元素类别;目前支持的消息对象包括:TIMTextElem(文本消息),TIMLocationElem(位置消息),TIMFaceElem(表情消息),TIMCustomElem(自定义消息),TIMSoundElem(语音消息),TIMImageElem(图像消息),TIMFileElem(文件消息),TIMVideoFileElem(视频消息)。 /// public string MsgType { get; set; } = "TIMCustomElem";// "TIMTextElem"; /// /// /// public MsgContent MsgContent { get; set; } } public class SendMsgReques { /// /// 1消息同步至发送方 2消息不同步至发送方 /// public int SyncOtherMachine { get; set; } /// /// 消息接收方 UserID /// public string To_Account { get; set; } /// /// 消息发送方 UserID null表示管理员 发送 /// public string? From_Account { get; set; } /// /// /// public int MsgSeq { get; set; } /// /// /// public long MsgRandom { get; set; } /// /// 消息内容 /// public List MsgBody { get; set; } /// /// /// public string? CloudCustomData { get; set; } /// /// 是否支持消息扩展 0为不支持 1为支持 /// public int? SupportMessageExtension { get; set; } /// /// 离线推送信息 /// public OfflinePushInfo offlinePushInfo { get; set; } } /// /// 离线推送信息 /// public class OfflinePushInfo { /// /// 0:表示推送 1:表示不离线推送 /// public int PushFlag { get; set; } = 0; /// /// 离线推送标题。 /// public string Title { get; set; } /// /// 离线推送内容 /// public string Desc { get; set; } /// /// 离线推送透传内容。由于国内各 Android 手机厂商的推送平台要求各不一样,请保证此字段为 JSON 格式,否则可能会导致收不到某些厂商的离线推送。 /// public string Ext { get; set; } } /// /// 发送到手机的消息内容 /// public class SendMsgToMobileContent { /// /// 标题 /// public string title { get; set; } /// /// SendMsgToMobileContentType枚举ToString() /// public string type { get; set; } /// /// 内容描述 /// public string desc { get; set; } /// /// 跳转路径 /// public string path { get; set; } /// /// 是否http链接 /// public bool ishttp { get; set; } /// /// /// public string summaryAbbr { get; set; } /// /// /// public string summary { get; set; } } /// /// 枚举值大于100的为http链接类型 /// public enum SendMsgToMobileContentType { /// /// 邀请入群 /// invite_to_group = 0, /// /// 用户资料卡片 /// user_card = 1, /// /// 工作记录 /// history_work_record = 2, /// /// 协助申请 /// assistance_application = 3, /// /// 通用聊天中部提示文字 /// center_tip = 4, /// /// 布置工作提醒 /// assigned_work_reminders = 5, /// /// 工作任务评论 /// work_task_comment = 6, /// /// 日报评论 /// daily_report_comment = 7, /// /// 周报评论 /// week_report_comment = 8, /// /// 月报评论 /// month_report_comment = 9, /// /// 意见反馈 /// feed_back = 101, } }