Upgrade
This commit is contained in:
@@ -21,22 +21,25 @@ class ConversationInfo {
|
||||
bool? isPinned;
|
||||
bool? isPrivateChat;
|
||||
String? ext;
|
||||
bool? isNotInGroup;
|
||||
|
||||
ConversationInfo(
|
||||
{required this.conversationID,
|
||||
this.conversationType,
|
||||
this.userID,
|
||||
this.groupID,
|
||||
this.showName,
|
||||
this.faceURL,
|
||||
this.recvMsgOpt,
|
||||
this.unreadCount,
|
||||
this.latestMsg,
|
||||
this.latestMsgSendTime,
|
||||
this.draftText,
|
||||
this.draftTextTime,
|
||||
this.isPrivateChat,
|
||||
this.isPinned});
|
||||
ConversationInfo({
|
||||
required this.conversationID,
|
||||
this.conversationType,
|
||||
this.userID,
|
||||
this.groupID,
|
||||
this.showName,
|
||||
this.faceURL,
|
||||
this.recvMsgOpt,
|
||||
this.unreadCount,
|
||||
this.latestMsg,
|
||||
this.latestMsgSendTime,
|
||||
this.draftText,
|
||||
this.draftTextTime,
|
||||
this.isPrivateChat,
|
||||
this.isPinned,
|
||||
this.isNotInGroup,
|
||||
});
|
||||
|
||||
ConversationInfo.fromJson(Map<String, dynamic> json)
|
||||
: conversationID = json['conversationID'] {
|
||||
@@ -59,6 +62,8 @@ class ConversationInfo {
|
||||
draftTextTime = json['draftTextTime'];
|
||||
isPinned = json['isPinned'];
|
||||
isPrivateChat = json['isPrivateChat'];
|
||||
isNotInGroup = json['isNotInGroup'];
|
||||
groupAtType = json['groupAtType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -77,6 +82,8 @@ class ConversationInfo {
|
||||
data['draftTextTime'] = this.draftTextTime;
|
||||
data['isPinned'] = this.isPinned;
|
||||
data['isPrivateChat'] = this.isPrivateChat;
|
||||
data['isNotInGroup'] = this.isNotInGroup;
|
||||
data['groupAtType'] = this.groupAtType;
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@@ -424,8 +424,16 @@ class AtElem {
|
||||
String? text;
|
||||
List<String>? atUserList;
|
||||
bool? isAtSelf;
|
||||
List<AtUserInfo>? atUsersInfo;
|
||||
Message? quoteMessage;
|
||||
|
||||
AtElem({this.text, this.atUserList, this.isAtSelf});
|
||||
AtElem({
|
||||
this.text,
|
||||
this.atUserList,
|
||||
this.isAtSelf,
|
||||
this.atUsersInfo,
|
||||
this.quoteMessage,
|
||||
});
|
||||
|
||||
AtElem.fromJson(Map<String, dynamic> json) {
|
||||
text = json['text'];
|
||||
@@ -433,6 +441,14 @@ class AtElem {
|
||||
atUserList = (json['atUserList'] as List).map((e) => '$e').toList();
|
||||
}
|
||||
isAtSelf = json['isAtSelf'];
|
||||
if (json['atUsersInfo'] is List) {
|
||||
atUsersInfo = (json['atUsersInfo'] as List)
|
||||
.map((e) => AtUserInfo.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
quoteMessage = null != json['quoteMessage']
|
||||
? Message.fromJson(json['quoteMessage'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -440,6 +456,8 @@ class AtElem {
|
||||
data['text'] = this.text;
|
||||
data['atUserList'] = this.atUserList;
|
||||
data['isAtSelf'] = this.isAtSelf;
|
||||
data['atUsersInfo'] = this.atUsersInfo?.map((e) => e.toJson()).toList();
|
||||
data['quoteMessage'] = this.quoteMessage?.toJson();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -705,3 +723,22 @@ class OfflinePushInfo {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AtUserInfo {
|
||||
String? atUserID;
|
||||
String? groupNickname;
|
||||
|
||||
AtUserInfo({this.atUserID, this.groupNickname});
|
||||
|
||||
AtUserInfo.fromJson(Map<String, dynamic> json) {
|
||||
atUserID = json['atUserID'];
|
||||
groupNickname = json['groupNickname'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['atUserID'] = this.atUserID;
|
||||
data['groupNickname'] = this.groupNickname;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,6 +233,33 @@ class QuitGroupNotification {
|
||||
}
|
||||
}
|
||||
|
||||
/// Enter group notification
|
||||
/// 进群通知
|
||||
class EnterGroupNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? entrantUser;
|
||||
|
||||
EnterGroupNotification({this.group, this.entrantUser});
|
||||
|
||||
EnterGroupNotification.fromJson(Map<String, dynamic> json) {
|
||||
group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null;
|
||||
entrantUser = json['entrantUser'] != null
|
||||
? GroupMembersInfo.fromJson(json['entrantUser'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.entrantUser != null) {
|
||||
data['quitUser'] = this.entrantUser!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Group rights transfer noticication
|
||||
/// 群权转让通知
|
||||
class GroupRightsTransferNoticication {
|
||||
@@ -277,11 +304,13 @@ class MuteMemberNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? opUser;
|
||||
GroupMembersInfo? mutedUser;
|
||||
int? mutedSeconds;
|
||||
|
||||
MuteMemberNotification({
|
||||
this.group,
|
||||
this.opUser,
|
||||
this.mutedUser,
|
||||
this.mutedSeconds,
|
||||
});
|
||||
|
||||
MuteMemberNotification.fromJson(Map<String, dynamic> json) {
|
||||
@@ -292,6 +321,7 @@ class MuteMemberNotification {
|
||||
mutedUser = json['mutedUser'] != null
|
||||
? GroupMembersInfo.fromJson(json['mutedUser'])
|
||||
: null;
|
||||
mutedSeconds = json['mutedSeconds'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -305,6 +335,7 @@ class MuteMemberNotification {
|
||||
if (this.mutedUser != null) {
|
||||
data['mutedUser'] = this.mutedUser!.toJson();
|
||||
}
|
||||
data['mutedSeconds'] = this.mutedSeconds;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -332,3 +363,41 @@ class BurnAfterReadingNotification {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/// Group member info changed notification
|
||||
/// 禁言成员通知
|
||||
class GroupMemberInfoChangedNotification {
|
||||
GroupInfo? group;
|
||||
GroupMembersInfo? opUser;
|
||||
GroupMembersInfo? changedUser;
|
||||
|
||||
GroupMemberInfoChangedNotification({
|
||||
this.group,
|
||||
this.opUser,
|
||||
this.changedUser,
|
||||
});
|
||||
|
||||
GroupMemberInfoChangedNotification.fromJson(Map<String, dynamic> json) {
|
||||
group = json['group'] != null ? GroupInfo.fromJson(json['group']) : null;
|
||||
opUser = json['opUser'] != null
|
||||
? GroupMembersInfo.fromJson(json['opUser'])
|
||||
: null;
|
||||
changedUser = json['changedUser'] != null
|
||||
? GroupMembersInfo.fromJson(json['changedUser'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
if (this.group != null) {
|
||||
data['group'] = this.group!.toJson();
|
||||
}
|
||||
if (this.opUser != null) {
|
||||
data['opUser'] = this.opUser!.toJson();
|
||||
}
|
||||
if (this.changedUser != null) {
|
||||
data['changedUser'] = this.changedUser!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
114
lib/src/models/workmoments_info.dart
Normal file
114
lib/src/models/workmoments_info.dart
Normal file
@@ -0,0 +1,114 @@
|
||||
class WorkMomentsInfo {
|
||||
/// 工作圈消息类型 0为普通评论 1为被喜欢 2为AT提醒看的朋友圈
|
||||
int? notificationMsgType;
|
||||
Comment? comment;
|
||||
|
||||
/// 工作圈id
|
||||
String? workMomentID;
|
||||
|
||||
/// 工作圈所属用户
|
||||
String? userID;
|
||||
|
||||
/// 工作圈所属用户名字
|
||||
String? userName;
|
||||
|
||||
/// 工作圈用户faceurl
|
||||
String? faceURL;
|
||||
|
||||
/// 工作圈内容
|
||||
String? workMomentContent;
|
||||
|
||||
WorkMomentsInfo(
|
||||
{this.notificationMsgType,
|
||||
this.comment,
|
||||
this.workMomentID,
|
||||
this.userID,
|
||||
this.userName,
|
||||
this.faceURL,
|
||||
this.workMomentContent});
|
||||
|
||||
WorkMomentsInfo.fromJson(Map<String, dynamic> json) {
|
||||
notificationMsgType = json['notificationMsgType'];
|
||||
comment =
|
||||
json['comment'] != null ? Comment.fromJson(json['comment']) : null;
|
||||
workMomentID = json['workMomentID'];
|
||||
userID = json['userID'];
|
||||
userName = json['userName'];
|
||||
faceURL = json['faceURL'];
|
||||
workMomentContent = json['workMomentContent'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = Map<String, dynamic>();
|
||||
data['notificationMsgType'] = this.notificationMsgType;
|
||||
if (this.comment != null) {
|
||||
data['comment'] = this.comment!.toJson();
|
||||
}
|
||||
data['workMomentID'] = this.workMomentID;
|
||||
data['userID'] = this.userID;
|
||||
data['userName'] = this.userName;
|
||||
data['faceURL'] = this.faceURL;
|
||||
data['workMomentContent'] = this.workMomentContent;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Comment {
|
||||
/// 回复的用户
|
||||
String? userID;
|
||||
|
||||
/// 回复的用户名
|
||||
String? userName;
|
||||
|
||||
/// 回复的用户头像
|
||||
String? faceURL;
|
||||
|
||||
/// 被回复的用户ID
|
||||
String? replyUserID;
|
||||
|
||||
/// 被回复的用户名字
|
||||
String? replyUserName;
|
||||
|
||||
/// 回复ID
|
||||
String? contentID;
|
||||
|
||||
/// 回复内容
|
||||
String? content;
|
||||
|
||||
/// 回复时间
|
||||
int? createTime;
|
||||
|
||||
Comment(
|
||||
{this.userID,
|
||||
this.userName,
|
||||
this.faceURL,
|
||||
this.replyUserID,
|
||||
this.replyUserName,
|
||||
this.contentID,
|
||||
this.content,
|
||||
this.createTime});
|
||||
|
||||
Comment.fromJson(Map<String, dynamic> json) {
|
||||
userID = json['userID'];
|
||||
userName = json['userName'];
|
||||
faceURL = json['faceURL'];
|
||||
replyUserID = json['replyUserID'];
|
||||
replyUserName = json['replyUserName'];
|
||||
contentID = json['contentID'];
|
||||
content = json['content'];
|
||||
createTime = json['createTime'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['userID'] = this.userID;
|
||||
data['userName'] = this.userName;
|
||||
data['faceURL'] = this.faceURL;
|
||||
data['replyUserID'] = this.replyUserID;
|
||||
data['replyUserName'] = this.replyUserName;
|
||||
data['contentID'] = this.contentID;
|
||||
data['content'] = this.content;
|
||||
data['createTime'] = this.createTime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user