This commit is contained in:
hrxiang
2022-06-27 17:55:18 +08:00
parent 7247f6b982
commit 6ad47216fb
37 changed files with 970 additions and 256 deletions

View File

@@ -3,24 +3,55 @@ import 'dart:convert';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class ConversationInfo {
/// 会话ID
String conversationID;
/// [ConversationType]
/// 会话类型[ConversationType]
int? conversationType;
/// 参与会话的userID
String? userID;
/// 参与会话的groupID
String? groupID;
/// 昵称
String? showName;
/// 头像
String? faceURL;
/// 免打扰 0正常1不接受消息2接受在线消息不接受离线消息
int? recvMsgOpt;
/// 未读消息数
int? unreadCount;
/// 强制提示,[GroupAtType]包含@所有人,@个人以及公告提示
int? groupAtType;
/// 会话最新消息内容
Message? latestMsg;
/// 最新消息发送时间
int? latestMsgSendTime;
/// 草稿
String? draftText;
/// 草稿生成时间
int? draftTextTime;
/// 是否置顶
bool? isPinned;
/// 是否开启了私聊(阅后即焚)
bool? isPrivateChat;
/// 附加内容
String? ext;
/// 是否还在组内如果退群返回true
bool? isNotInGroup;
ConversationInfo({

View File

@@ -1,19 +1,46 @@
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
/// 群信息
class GroupInfo {
/// 群ID
String groupID;
/// 群名
String? groupName;
/// 群公告
String? notification;
/// 群简介
String? introduction;
/// 群头像
String? faceURL;
/// 拥有者ID
String? ownerUserID;
/// 创建时间
int? createTime;
/// 群成员数
int? memberCount;
/// ok = 0 blocked = 1 Dismissed = 2 Muted = 3
/// 群状态0正常1被封2解散3禁言
int? status;
/// 创建者ID
String? creatorUserID;
/// 群类型
int? groupType;
/// 扩展字段
String? ex;
/// 进群验证方式[GroupVerification]
int? needVerification;
GroupInfo({
required this.groupID,
this.groupName,
@@ -27,6 +54,7 @@ class GroupInfo {
this.creatorUserID,
this.groupType,
this.ex,
this.needVerification,
});
GroupInfo.fromJson(Map<String, dynamic> json) : groupID = json['groupID'] {
@@ -42,6 +70,7 @@ class GroupInfo {
creatorUserID = json['creatorUserID'];
groupType = json['groupType'];
ex = json['ex'];
needVerification = json['needVerification'];
}
Map<String, dynamic> toJson() {
@@ -58,20 +87,41 @@ class GroupInfo {
data['creatorUserID'] = this.creatorUserID;
data['groupType'] = this.groupType;
data['ex'] = this.ex;
data['needVerification'] = this.needVerification;
return data;
}
}
/// 群成员信息
class GroupMembersInfo {
/// 群id
String? groupID;
/// 用户id
String? userID;
/// 昵称
String? nickname;
/// 头像
String? faceURL;
/// 角色[GroupRoleLevel]
int? roleLevel;
/// 加入时间
int? joinTime;
/// 入群方式
int? joinSource;
/// 操作者id
String? operatorUserID;
String? ext;
/// 扩展字段
String? ex;
/// 禁言时间s
int? muteEndTime;
int? appMangerLevel;
@@ -82,7 +132,7 @@ class GroupMembersInfo {
this.joinTime,
this.nickname,
this.faceURL,
this.ext,
this.ex,
this.joinSource,
this.operatorUserID,
this.muteEndTime,
@@ -96,7 +146,7 @@ class GroupMembersInfo {
joinTime = json['joinTime'];
nickname = json['nickname'];
faceURL = json['faceURL'];
ext = json['ext'];
ex = json['ex'];
joinSource = json['joinSource'];
operatorUserID = json['operatorUserID'];
muteEndTime = json['muteEndTime'];
@@ -111,7 +161,7 @@ class GroupMembersInfo {
data['joinTime'] = this.joinTime;
data['nickname'] = this.nickname;
data['faceURL'] = this.faceURL;
data['ext'] = this.ext;
data['ex'] = this.ex;
data['joinSource'] = this.joinSource;
data['operatorUserID'] = this.operatorUserID;
data['muteEndTime'] = this.muteEndTime;
@@ -120,11 +170,12 @@ class GroupMembersInfo {
}
}
/// 群成员角色
class GroupMemberRole {
/// 用户ID
String? userID;
/// 1 ordinary member, 2 group owners, 3 administrators
/// 1普通成员, 2群主3管理员
/// [GroupRoleLevel] 1普通成员, 2群主3管理员
int? roleLevel;
GroupMemberRole({this.userID, this.roleLevel = 1});
@@ -142,31 +193,72 @@ class GroupMemberRole {
}
}
/// 群申请信息
class GroupApplicationInfo {
/// 群ID
String? groupID;
/// 群昵称
String? groupName;
/// 群公告
String? notification;
/// 群介绍
String? introduction;
/// 群头像
String? groupFaceURL;
/// 群创建时间
int? createTime;
/// 群状态
int? status;
/// 创建者id
String? creatorUserID;
/// 群类型
int? groupType;
/// 拥有者id
String? ownerUserID;
/// 成员数量
int? memberCount;
/// 发起入群申请的用户id
String? userID;
/// 发起入群申请的用户昵称
String? nickname;
/// 发起入群申请的用户头像
String? userFaceURL;
/// 发起入群申请的用户性别
int? gender;
/// REFUSE = -1, AGREE = 1
/// -1拒绝1同意
/// 处理结果:-1拒绝1同意
int? handleResult;
/// 请求说明
String? reqMsg;
/// 处理结果说明
String? handledMsg;
/// 请求时间
int? reqTime;
/// 处理者用户ID
String? handleUserID;
/// 处理时间
int? handledTime;
/// 扩展信息
String? ex;
GroupApplicationInfo({

View File

@@ -1,43 +1,108 @@
import 'dart:io';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class Message {
/// 消息id唯一标识
String? clientMsgID;
/// 服务端生成的id
String? serverMsgID;
/// 创建时间
int? createTime;
/// 发送时间
int? sendTime;
/// [ConversationType]
/// 会话类型[ConversationType]
int? sessionType;
/// 发送者id
String? sendID;
/// 接收者id
String? recvID;
/// 来源
int? msgFrom;
/// [MessageType]
/// 消息类型[MessageType]
int? contentType;
/// 平台[Platform]
int? platformID;
/// 发送者昵称
String? senderNickname;
/// 发送者头像
String? senderFaceUrl;
/// 群ID
String? groupID;
/// 消息内容
String? content;
/// 消息的seq
int? seq;
/// 是否已读
bool? isRead;
/// 已读时间
int? hasReadTime;
/// [MessageStatus]
/// 消息发送状态[MessageStatus]
int? status;
/// 离线显示内容
OfflinePushInfo? offlinePush;
/// 附加信息
String? attachedInfo;
/// 扩展信息
String? ex;
/// 自定义扩展信息,目前用于客服端处理消息时间分段
dynamic ext;
/// 图片
PictureElem? pictureElem;
/// 语音
SoundElem? soundElem;
/// 视频
VideoElem? videoElem;
/// 文件
FileElem? fileElem;
/// @信息
AtElem? atElem;
/// 位置
LocationElem? locationElem;
/// 自定义
CustomElem? customElem;
/// 引用
QuoteElem? quoteElem;
/// 合并
MergeElem? mergeElem;
/// 通知
NotificationElem? notificationElem;
/// 自定义表情
FaceElem? faceElem;
/// 附加信息
AttachedInfoElem? attachedInfoElem;
Message({
@@ -224,10 +289,18 @@ class Message {
}
}
/// 图片消息内容
class PictureElem {
/// 原路径
String? sourcePath;
/// 原图对象
PictureInfo? sourcePicture;
/// 大图对象
PictureInfo? bigPicture;
/// 缩率图对象
PictureInfo? snapshotPicture;
PictureElem(
@@ -265,12 +338,24 @@ class PictureElem {
}
}
/// 图片信息
class PictureInfo {
/// id
String? uuid;
/// 图片mime类型
String? type;
/// 大小
int? size;
/// 宽度
int? width;
/// 长度
int? height;
/// 图片URL地址
String? url;
PictureInfo(
@@ -297,11 +382,21 @@ class PictureInfo {
}
}
/// 语音消息内容
class SoundElem {
/// id
String? uuid;
/// 原路径
String? soundPath;
/// url地址
String? sourceUrl;
/// 大小
int? dataSize;
/// 时间s
int? duration;
SoundElem(
@@ -330,18 +425,42 @@ class SoundElem {
}
}
/// 视频消息内容
class VideoElem {
/// 视频路径
String? videoPath;
/// uuid
String? videoUUID;
/// 视频的url地址
String? videoUrl;
/// mime类型
String? videoType;
/// 大小
int? videoSize;
/// 时长s
int? duration;
/// 缩率图路径
String? snapshotPath;
/// 缩率图uuid
String? snapshotUUID;
/// 缩率图大小
int? snapshotSize;
/// 缩率图URL地址
String? snapshotUrl;
/// 缩率图宽度
int? snapshotWidth;
/// 缩率图高度
int? snapshotHeight;
VideoElem(
@@ -391,11 +510,21 @@ class VideoElem {
}
}
/// 文件消息内容
class FileElem {
/// 文件路径
String? filePath;
/// uuid
String? uuid;
/// 文件URL地址
String? sourceUrl;
/// 文件名
String? fileName;
/// 文件大小
int? fileSize;
FileElem(
@@ -420,11 +549,21 @@ class FileElem {
}
}
/// @消息内容
class AtElem {
/// 消息内容
String? text;
/// 被@的用户ID列表
List<String>? atUserList;
/// 是否包含自己
bool? isAtSelf;
/// 被@的用户ID跟昵称关系列表用于将消息内容里的用户id替换为昵称显示
List<AtUserInfo>? atUsersInfo;
/// 被回复的消息体,回复别人并@了人
Message? quoteMessage;
AtElem({
@@ -462,9 +601,15 @@ class AtElem {
}
}
/// 位置消息内日
class LocationElem {
/// 位置描述
String? description;
/// 经度
double? longitude;
/// 纬度
double? latitude;
LocationElem({this.description, this.longitude, this.latitude});
@@ -493,9 +638,15 @@ class LocationElem {
}
}
/// 自定义消息
class CustomElem {
/// 自定义数据
String? data;
/// 扩展内容
String? extension;
/// 描述内容
String? description;
CustomElem({this.data, this.extension, this.description});
@@ -515,8 +666,12 @@ class CustomElem {
}
}
/// 引用消息(被回复的消息)
class QuoteElem {
/// 回复内容内容
String? text;
/// 被回复的消息体
Message? quoteMessage;
QuoteElem({this.text, this.quoteMessage});
@@ -536,9 +691,15 @@ class QuoteElem {
}
}
/// 合并消息体
class MergeElem {
/// 标题
String? title;
/// 摘要
List<String>? abstractList;
/// 具体选择合并的消息列表
List<Message>? multiMessage;
MergeElem({this.title, this.abstractList, this.multiMessage});
@@ -564,8 +725,12 @@ class MergeElem {
}
}
/// 通知
class NotificationElem {
/// 详情
String? detail;
/// 提示
String? defaultTips;
NotificationElem({this.detail, this.defaultTips});
@@ -583,8 +748,12 @@ class NotificationElem {
}
}
/// 表情
class FaceElem {
/// 位置表情,用户端对端自定义内嵌的表情包
int? index;
/// 其他表情如URL表情直接返回url
String? data;
FaceElem({this.index, this.data});
@@ -602,12 +771,18 @@ class FaceElem {
}
}
/// 附加信息
class AttachedInfoElem {
/// 群消息已读信息
GroupHasReadInfo? groupHasReadInfo;
/// 单聊有效
/// 是否为私聊消息(阅后即焚消息),单聊有效
bool? isPrivateChat;
/// 已读时间
int? hasReadTime;
/// 离线不发送推送
bool? notSenderNotificationPush;
AttachedInfoElem({
@@ -636,9 +811,15 @@ class AttachedInfoElem {
}
}
/// 群消息已读信息
class GroupHasReadInfo {
/// 已读的用户id列表
List<String>? hasReadUserIDList;
/// 已读总数
int? hasReadCount;
/// 发送此条消息时的群人数
int? groupMemberCount;
GroupHasReadInfo.fromJson(Map<String, dynamic> json) {
@@ -660,13 +841,27 @@ class GroupHasReadInfo {
}
}
/// 消息已读回执信息
class ReadReceiptInfo {
/// 发送者id
String? userID;
/// 群id
String? groupID;
/// 已读消息的clientMsgID集合
List<String>? msgIDList;
/// 读时间
int? readTime;
/// 消息来源
int? msgFrom;
/// 消息类型[MessageType]
int? contentType;
/// 会话类型[ConversationType]
int? sessionType;
ReadReceiptInfo(
@@ -702,11 +897,21 @@ class ReadReceiptInfo {
}
}
/// 离线推送信息
class OfflinePushInfo {
/// 通知标题
String? title;
/// 通知描述
String? desc;
/// 扩展内容
String? ex;
/// 仅ios有效
String? iOSPushSound;
/// 仅ios有效
bool? iOSBadgeCount;
OfflinePushInfo(
@@ -731,8 +936,12 @@ class OfflinePushInfo {
}
}
/// @消息用户id跟昵称关系对象
class AtUserInfo {
/// 被@的用户id
String? atUserID;
/// 被@的用户昵称
String? groupNickname;
AtUserInfo({this.atUserID, this.groupNickname});

View File

@@ -1,25 +1,38 @@
import '../../flutter_openim_sdk.dart';
/// OA notification
/// oa 通知
class OANotification {
/// 标题
String? notificationName;
/// 头像
String? notificationFaceURL;
/// 类型
int? notificationType;
/// 文本内容
String? text;
/// 跳转链接
String? externalUrl;
/// Notification Mix Type
/// 0: Plain text notification
/// 1: Text+picture notification
/// 2: Text+video notification
/// 3: Text+file notification
/// 0纯文字通知 1文字+图片通知 2文字+视频通知 3文字+文件通知
int? mixType;
/// 图片信息
PictureElem? pictureElem;
/// 语音信息
SoundElem? soundElem;
/// 视频信息
VideoElem? videoElem;
/// 文件信息
FileElem? fileElem;
/// 扩展字段
String? ex;
OANotification(
@@ -81,11 +94,18 @@ class OANotification {
}
}
/// Group common notification
/// 群事件通知
class GroupNotification {
/// 群信息
GroupInfo? group;
/// 当前事件操作者信息
GroupMembersInfo? opUser;
/// 群拥有者信息
GroupMembersInfo? groupOwnerUser;
/// 产生影响的群成员列表
List<GroupMembersInfo>? memberList;
GroupNotification({
@@ -129,11 +149,15 @@ class GroupNotification {
}
}
/// User is invited to the group notification
/// 用户被邀请进群通知
class InvitedJoinGroupNotification {
/// 群信息
GroupInfo? group;
/// 操作者信息
GroupMembersInfo? opUser;
/// 被邀请进群的成员信息
List<GroupMembersInfo>? invitedUserList;
InvitedJoinGroupNotification({this.group, this.opUser, this.invitedUserList});
@@ -167,11 +191,15 @@ class InvitedJoinGroupNotification {
}
}
/// Group kicked member notification
/// 组踢出成员通知
class KickedGroupMemeberNotification {
/// 群信息
GroupInfo? group;
/// 操作者信息
GroupMembersInfo? opUser;
/// 被踢出群的成员信息列表
List<GroupMembersInfo>? kickedUserList;
KickedGroupMemeberNotification(
@@ -206,10 +234,12 @@ class KickedGroupMemeberNotification {
}
}
/// Exit group notification
/// 退出群通知
class QuitGroupNotification {
/// 群信息
GroupInfo? group;
/// 退群的成员信息
GroupMembersInfo? quitUser;
QuitGroupNotification({this.group, this.quitUser});
@@ -233,10 +263,12 @@ class QuitGroupNotification {
}
}
/// Enter group notification
/// 进群通知
class EnterGroupNotification {
/// 群信息
GroupInfo? group;
/// 进入群的成员信息
GroupMembersInfo? entrantUser;
EnterGroupNotification({this.group, this.entrantUser});
@@ -260,11 +292,15 @@ class EnterGroupNotification {
}
}
/// Group rights transfer noticication
/// 群权转让通知
class GroupRightsTransferNoticication {
/// 群信息
GroupInfo? group;
/// 操作者信息
GroupMembersInfo? opUser;
/// 群新的拥有者信息
GroupMembersInfo? newGroupOwner;
GroupRightsTransferNoticication({
@@ -298,12 +334,18 @@ class GroupRightsTransferNoticication {
}
}
/// Mute member notification
/// 禁言成员通知
class MuteMemberNotification {
/// 群信息
GroupInfo? group;
/// 操作者信息
GroupMembersInfo? opUser;
/// 被禁言的成员信息
GroupMembersInfo? mutedUser;
/// 禁言时间s
int? mutedSeconds;
MuteMemberNotification({
@@ -340,11 +382,15 @@ class MuteMemberNotification {
}
}
/// Burn after reading notification
/// 阅后即焚通知
class BurnAfterReadingNotification {
/// 接收者
String? recvID;
/// 发送者
String? sendID;
/// 是否开启
bool? isPrivate;
BurnAfterReadingNotification({this.recvID, this.sendID, this.isPrivate});
@@ -364,11 +410,15 @@ class BurnAfterReadingNotification {
}
}
/// Group member info changed notification
/// 禁言成员通知
/// 群成员信息发送变化通知
class GroupMemberInfoChangedNotification {
/// 群信息
GroupInfo? group;
/// 操作者信息
GroupMembersInfo? opUser;
/// 资料发生改变的成员
GroupMembersInfo? changedUser;
GroupMemberInfoChangedNotification({

View File

@@ -1,14 +1,36 @@
/// 部门信息
class DeptInfo {
/// 部门id
String? departmentID;
/// 头像
String? faceURL;
/// 显示名
String? name;
/// 上一级部门id
String? parentID;
/// 排序方式
int? order;
/// 部门类型
int? departmentType;
/// 创建时间
int? createTime;
/// 子部门数量
int? subDepartmentNum;
/// 成员数量
int? memberNum;
/// 扩展字段
String? ex;
/// 附加信息
String? attachedInfo;
DeptInfo(
@@ -65,27 +87,63 @@ class DeptInfo {
int get hashCode => departmentID.hashCode;
}
/// 部门成员信息
class DeptMemberInfo {
/// 用户id
String? userID;
/// 用户昵称
String? nickname;
/// 英文名
String? englishName;
/// 头像
String? faceURL;
/// 性别
int? gender;
/// 手机号
String? mobile;
/// 座机
String? telephone;
/// 出生时间
int? birth;
/// 邮箱
String? email;
/// 所在部门的id
String? departmentID;
/// 排序方式
int? order;
/// 职位
String? position;
///
int? leader;
/// 状态
int? status;
/// 创建时间
int? createTime;
/// 扩展字段
String? ex;
/// 附加信息
String? attachedInfo;
/// 搜索时使用
String? departmentName;
/// 所在部门的所有上级部门
List<DeptInfo>? parentDepartmentList;
DeptMemberInfo({
@@ -177,7 +235,10 @@ class DeptMemberInfo {
/// 用户所在的部门
class UserInDept {
/// 部门信息
DeptInfo? department;
/// 所在部门自己的信息
DeptMemberInfo? member;
UserInDept({this.department, this.member});
@@ -204,8 +265,13 @@ class UserInDept {
/// 部门下的子部门跟员工
class DeptMemberAndSubDept {
/// 一级子部门
List<DeptInfo>? departmentList;
/// 一级成员
List<DeptMemberInfo>? departmentMemberList;
/// 当前部门的所有上一级部门
List<DeptInfo>? parentDepartmentList;
DeptMemberAndSubDept({
@@ -253,8 +319,12 @@ class DeptMemberAndSubDept {
}
}
/// 搜索结果
class OrganizationSearchResult {
/// 部门列表
List<DeptInfo>? departmentList;
/// 部门成员列表
List<DeptMemberInfo>? departmentMemberList;
OrganizationSearchResult({

View File

@@ -3,6 +3,8 @@ import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class SearchResult {
/// 获取到的总的消息数量
int? totalCount;
/// 搜索到的具体内容
List<SearchResultItems>? searchResultItems;
SearchResult({this.totalCount, this.searchResultItems});
@@ -34,7 +36,11 @@ class SearchResultItems {
/// 会话类型1单聊2群聊3超级大群4通知会话
int? conversationType;
/// 显示名
String? showName;
/// 头像
String? faceURL;
/// 搜索到的这个会话下的消息数量

View File

@@ -1,8 +1,15 @@
import 'dart:io';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class SignalingInfo {
/// 操作者
String? opUserID;
/// 邀请信息
InvitationInfo? invitation;
/// 离线显示内容
OfflinePushInfo? offlinePushInfo;
SignalingInfo({
@@ -31,15 +38,32 @@ class SignalingInfo {
}
class InvitationInfo {
String? inviterUserID; //邀请者UserID
List<String>? inviteeUserIDList; //被邀请者UserID列表如果是单聊只有一个元素
String? groupID; //如果是单聊,为""
String? roomID; //房间ID必须唯一可以不设置。
int? timeout; //邀请超时时间(秒)
/// 邀请者UserID
String? inviterUserID;
/// 被邀请者UserID列表如果是单聊只有一个元素
List<String>? inviteeUserIDList;
/// 如果是单聊,为""
String? groupID;
/// 房间ID必须唯一可以不设置。
String? roomID;
/// 邀请超时时间(秒)
int? timeout;
/// 发起时间
int? initiateTime;
String? mediaType; //video 或者audio
int? sessionType; //1为单聊2为群聊
int? platformID; //和之前定义一致
/// video 或者 audio
String? mediaType;
/// [ConversationType]1为单聊2为群聊
int? sessionType;
/// 平台[Platform]
int? platformID;
InvitationInfo(
{this.inviterUserID,
@@ -79,9 +103,15 @@ class InvitationInfo {
}
}
/// 信令凭证
class SignalingCertificate {
/// 登录token
String? token;
/// 房间id
String? roomID;
/// 服务器地址
String? liveURL;
SignalingCertificate({this.token, this.roomID, this.liveURL});

View File

@@ -5,31 +5,52 @@
/// Not a friend is not on the blacklist
/// 不是好友不在黑名单
class UserInfo {
/// 用户id
String? userID;
/// 用户昵称
String? nickname;
/// 头像
String? faceURL;
/// 性别
int? gender;
/// 手机号
String? phoneNumber;
/// 出生时间
int? birth;
/// 邮箱
String? email;
/// 扩展字段
String? ex;
/// 创建时间
int? createTime;
/// 备注
String? remark;
/// User's public profile用户公开的资料
/// 用户公开的资料
PublicUserInfo? publicInfo;
/// Only friends can view information好友才能查看的资料
/// 好友才能查看的资料
FriendInfo? friendInfo;
/// blacklist information黑名单资料
/// 黑名单资料
BlacklistInfo? blackInfo;
/// 是否好友关系
bool? isFriendship;
/// 是否黑名单
bool? isBlacklist;
/// 全局免打扰
/// 全局免打扰 0正常1不接受消息2接受在线消息不接受离线消息
int? globalRecvMsgOpt;
UserInfo({
@@ -165,12 +186,24 @@ class UserInfo {
int get hashCode => userID.hashCode;
}
/// 公开的资料
class PublicUserInfo {
/// 用户id
String? userID;
/// 昵称
String? nickname;
/// 头像
String? faceURL;
/// 性别
int? gender;
///
int? appMangerLevel;
/// 扩展信息
String? ex;
PublicUserInfo({
@@ -203,18 +236,42 @@ class PublicUserInfo {
}
}
/// 好友信息
class FriendInfo {
/// 用户id
String? userID;
/// 昵称
String? nickname;
/// 头像
String? faceURL;
/// 性别
int? gender;
/// 手机号
String? phoneNumber;
/// 出生日期
int? birth;
/// 邮箱
String? email;
/// 备注
String? remark;
/// 扩展字段
String? ex;
/// 创建时间
int? createTime;
/// 添加方式
int? addSource;
/// 操作者id
String? operatorUserID;
FriendInfo({
@@ -267,14 +324,30 @@ class FriendInfo {
}
}
/// 黑名单信息
class BlacklistInfo {
/// 用户id
String? userID;
/// 昵称
String? nickname;
/// 头像
String? faceURL;
/// 性别
int? gender;
/// 创建时间
int? createTime;
/// 添加方式
int? addSource;
/// 操作者
String? operatorUserID;
/// 扩展信息
String? ex;
BlacklistInfo({
@@ -313,10 +386,11 @@ class BlacklistInfo {
}
}
/// 关系
class FriendshipInfo {
/// 用户id
String? userID;
/// 1 means friend (and not blacklist)
/// 1表示好友并且不是黑名单
int? result;
@@ -335,21 +409,51 @@ class FriendshipInfo {
}
}
/// 好友申请信息
class FriendApplicationInfo {
/// 发起者用户id
String? fromUserID;
/// 发起者用户昵称
String? fromNickname;
/// 发起者用户头像
String? fromFaceURL;
/// 发起者性别
int? fromGender;
/// 接收者用户id
String? toUserID;
/// 接收者用户昵称
String? toNickname;
/// 接收者头像
String? toFaceURL;
/// 接收者性别
int? toGender;
/// 处理结果
int? handleResult;
/// 请求消息
String? reqMsg;
/// 创建时间
int? createTime;
/// 处理者id
String? handlerUserID;
/// 处理备注
String? handleMsg;
/// 处理时间
int? handleTime;
/// 扩展字段
String? ex;
FriendApplicationInfo(
@@ -407,12 +511,12 @@ class FriendApplicationInfo {
return data;
}
/// friend application waiting handle
/// 等待处理
bool get isWaitingHandle => handleResult == 0;
/// friend application agreed
/// 已同意
bool get isAgreed => handleResult == 1;
/// friend application rejected
/// 已拒绝
bool get isRejected => handleResult == -1;
}