Merge remote-tracking branch 'origin/dev' into cody/netwrok_SDK
# Conflicts: # apps/im_app/lib/features/chat/presentation/chat_db_test_view_model.dart # apps/im_app/lib/features/login/presentation/login_view_model.dart 修复逻辑漏洞,性能优化
This commit is contained in:
67
apps/im_app/lib/domain/entities/call_log.dart
Normal file
67
apps/im_app/lib/domain/entities/call_log.dart
Normal file
@@ -0,0 +1,67 @@
|
||||
/// 通话记录 Domain 实体
|
||||
///
|
||||
/// 全局共享实体,被 call / chat 等多个 Feature 共用。
|
||||
/// 纯 Dart 类,零 Flutter / 零网络 / 零 DB 依赖。
|
||||
class CallLog {
|
||||
final String id;
|
||||
final int? callerId;
|
||||
final int? receiverId;
|
||||
final int? chatId;
|
||||
final int? duration;
|
||||
final int? videoCall;
|
||||
final int? createdAt;
|
||||
final int? updatedAt;
|
||||
final int? endedAt;
|
||||
final int? status;
|
||||
final int? isDeleted;
|
||||
final int? deletedAt;
|
||||
final int? isRead;
|
||||
|
||||
const CallLog({
|
||||
required this.id,
|
||||
this.callerId,
|
||||
this.receiverId,
|
||||
this.chatId,
|
||||
this.duration,
|
||||
this.videoCall,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.endedAt,
|
||||
this.status,
|
||||
this.isDeleted,
|
||||
this.deletedAt,
|
||||
this.isRead,
|
||||
});
|
||||
|
||||
CallLog copyWith({
|
||||
String? id,
|
||||
int? callerId,
|
||||
int? receiverId,
|
||||
int? chatId,
|
||||
int? duration,
|
||||
int? videoCall,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? endedAt,
|
||||
int? status,
|
||||
int? isDeleted,
|
||||
int? deletedAt,
|
||||
int? isRead,
|
||||
}) {
|
||||
return CallLog(
|
||||
id: id ?? this.id,
|
||||
callerId: callerId ?? this.callerId,
|
||||
receiverId: receiverId ?? this.receiverId,
|
||||
chatId: chatId ?? this.chatId,
|
||||
duration: duration ?? this.duration,
|
||||
videoCall: videoCall ?? this.videoCall,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
endedAt: endedAt ?? this.endedAt,
|
||||
status: status ?? this.status,
|
||||
isDeleted: isDeleted ?? this.isDeleted,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
isRead: isRead ?? this.isRead,
|
||||
);
|
||||
}
|
||||
}
|
||||
200
apps/im_app/lib/domain/entities/chat.dart
Normal file
200
apps/im_app/lib/domain/entities/chat.dart
Normal file
@@ -0,0 +1,200 @@
|
||||
/// 聊天 Domain 实体
|
||||
class Chat {
|
||||
final int id;
|
||||
final int? typ;
|
||||
final int? lastId;
|
||||
final int? lastTyp;
|
||||
final String? lastMsg;
|
||||
final int? lastTime;
|
||||
final int lastPos;
|
||||
final int firstPos;
|
||||
final int? msgIdx;
|
||||
final String? profile;
|
||||
final String? pin;
|
||||
final String? icon;
|
||||
final String iconGaussian;
|
||||
final String? name;
|
||||
final int? userId;
|
||||
final int? chatId;
|
||||
final int? friendId;
|
||||
final int? sort;
|
||||
final int? unreadNum;
|
||||
final int? unreadCount;
|
||||
final int? hideChatMsgIdx;
|
||||
final int? readChatMsgIdx;
|
||||
final int? otherReadIdx;
|
||||
final String? unreadAtMsgIdx;
|
||||
final int? deleteTime;
|
||||
final int? addIndex;
|
||||
final int flag;
|
||||
final int? flagMy;
|
||||
final int? autoDeleteInterval;
|
||||
final int? mute;
|
||||
final int? verified;
|
||||
final int? createTime;
|
||||
final int? startIdx;
|
||||
final int? isReadMsg;
|
||||
final String translateOutgoing;
|
||||
final String translateIncoming;
|
||||
final int incomingIdx;
|
||||
final int outgoingIdx;
|
||||
final int incomingSoundId;
|
||||
final int outgoingSoundId;
|
||||
final int notificationSoundId;
|
||||
final String chatKey;
|
||||
final String activeChatKey;
|
||||
final int coverIdx;
|
||||
final int round;
|
||||
final int workspaceId;
|
||||
final int localPermission;
|
||||
|
||||
const Chat({
|
||||
required this.id,
|
||||
this.typ,
|
||||
this.lastId,
|
||||
this.lastTyp,
|
||||
this.lastMsg,
|
||||
this.lastTime,
|
||||
this.lastPos = 0,
|
||||
this.firstPos = -1,
|
||||
this.msgIdx,
|
||||
this.profile,
|
||||
this.pin,
|
||||
this.icon,
|
||||
this.iconGaussian = '',
|
||||
this.name,
|
||||
this.userId,
|
||||
this.chatId,
|
||||
this.friendId,
|
||||
this.sort,
|
||||
this.unreadNum,
|
||||
this.unreadCount,
|
||||
this.hideChatMsgIdx,
|
||||
this.readChatMsgIdx,
|
||||
this.otherReadIdx,
|
||||
this.unreadAtMsgIdx,
|
||||
this.deleteTime,
|
||||
this.addIndex,
|
||||
this.flag = 0,
|
||||
this.flagMy,
|
||||
this.autoDeleteInterval,
|
||||
this.mute,
|
||||
this.verified,
|
||||
this.createTime,
|
||||
this.startIdx,
|
||||
this.isReadMsg,
|
||||
this.translateOutgoing = '',
|
||||
this.translateIncoming = '',
|
||||
this.incomingIdx = 0,
|
||||
this.outgoingIdx = 0,
|
||||
this.incomingSoundId = 0,
|
||||
this.outgoingSoundId = 0,
|
||||
this.notificationSoundId = 0,
|
||||
this.chatKey = '',
|
||||
this.activeChatKey = '',
|
||||
this.coverIdx = 0,
|
||||
this.round = 0,
|
||||
this.workspaceId = 0,
|
||||
this.localPermission = 0,
|
||||
});
|
||||
|
||||
Chat copyWith({
|
||||
int? id,
|
||||
int? typ,
|
||||
int? lastId,
|
||||
int? lastTyp,
|
||||
String? lastMsg,
|
||||
int? lastTime,
|
||||
int? lastPos,
|
||||
int? firstPos,
|
||||
int? msgIdx,
|
||||
String? profile,
|
||||
String? pin,
|
||||
String? icon,
|
||||
String? iconGaussian,
|
||||
String? name,
|
||||
int? userId,
|
||||
int? chatId,
|
||||
int? friendId,
|
||||
int? sort,
|
||||
int? unreadNum,
|
||||
int? unreadCount,
|
||||
int? hideChatMsgIdx,
|
||||
int? readChatMsgIdx,
|
||||
int? otherReadIdx,
|
||||
String? unreadAtMsgIdx,
|
||||
int? deleteTime,
|
||||
int? addIndex,
|
||||
int? flag,
|
||||
int? flagMy,
|
||||
int? autoDeleteInterval,
|
||||
int? mute,
|
||||
int? verified,
|
||||
int? createTime,
|
||||
int? startIdx,
|
||||
int? isReadMsg,
|
||||
String? translateOutgoing,
|
||||
String? translateIncoming,
|
||||
int? incomingIdx,
|
||||
int? outgoingIdx,
|
||||
int? incomingSoundId,
|
||||
int? outgoingSoundId,
|
||||
int? notificationSoundId,
|
||||
String? chatKey,
|
||||
String? activeChatKey,
|
||||
int? coverIdx,
|
||||
int? round,
|
||||
int? workspaceId,
|
||||
int? localPermission,
|
||||
}) {
|
||||
return Chat(
|
||||
id: id ?? this.id,
|
||||
typ: typ ?? this.typ,
|
||||
lastId: lastId ?? this.lastId,
|
||||
lastTyp: lastTyp ?? this.lastTyp,
|
||||
lastMsg: lastMsg ?? this.lastMsg,
|
||||
lastTime: lastTime ?? this.lastTime,
|
||||
lastPos: lastPos ?? this.lastPos,
|
||||
firstPos: firstPos ?? this.firstPos,
|
||||
msgIdx: msgIdx ?? this.msgIdx,
|
||||
profile: profile ?? this.profile,
|
||||
pin: pin ?? this.pin,
|
||||
icon: icon ?? this.icon,
|
||||
iconGaussian: iconGaussian ?? this.iconGaussian,
|
||||
name: name ?? this.name,
|
||||
userId: userId ?? this.userId,
|
||||
chatId: chatId ?? this.chatId,
|
||||
friendId: friendId ?? this.friendId,
|
||||
sort: sort ?? this.sort,
|
||||
unreadNum: unreadNum ?? this.unreadNum,
|
||||
unreadCount: unreadCount ?? this.unreadCount,
|
||||
hideChatMsgIdx: hideChatMsgIdx ?? this.hideChatMsgIdx,
|
||||
readChatMsgIdx: readChatMsgIdx ?? this.readChatMsgIdx,
|
||||
otherReadIdx: otherReadIdx ?? this.otherReadIdx,
|
||||
unreadAtMsgIdx: unreadAtMsgIdx ?? this.unreadAtMsgIdx,
|
||||
deleteTime: deleteTime ?? this.deleteTime,
|
||||
addIndex: addIndex ?? this.addIndex,
|
||||
flag: flag ?? this.flag,
|
||||
flagMy: flagMy ?? this.flagMy,
|
||||
autoDeleteInterval: autoDeleteInterval ?? this.autoDeleteInterval,
|
||||
mute: mute ?? this.mute,
|
||||
verified: verified ?? this.verified,
|
||||
createTime: createTime ?? this.createTime,
|
||||
startIdx: startIdx ?? this.startIdx,
|
||||
isReadMsg: isReadMsg ?? this.isReadMsg,
|
||||
translateOutgoing: translateOutgoing ?? this.translateOutgoing,
|
||||
translateIncoming: translateIncoming ?? this.translateIncoming,
|
||||
incomingIdx: incomingIdx ?? this.incomingIdx,
|
||||
outgoingIdx: outgoingIdx ?? this.outgoingIdx,
|
||||
incomingSoundId: incomingSoundId ?? this.incomingSoundId,
|
||||
outgoingSoundId: outgoingSoundId ?? this.outgoingSoundId,
|
||||
notificationSoundId: notificationSoundId ?? this.notificationSoundId,
|
||||
chatKey: chatKey ?? this.chatKey,
|
||||
activeChatKey: activeChatKey ?? this.activeChatKey,
|
||||
coverIdx: coverIdx ?? this.coverIdx,
|
||||
round: round ?? this.round,
|
||||
workspaceId: workspaceId ?? this.workspaceId,
|
||||
localPermission: localPermission ?? this.localPermission,
|
||||
);
|
||||
}
|
||||
}
|
||||
100
apps/im_app/lib/domain/entities/chat_bot.dart
Normal file
100
apps/im_app/lib/domain/entities/chat_bot.dart
Normal file
@@ -0,0 +1,100 @@
|
||||
/// 聊天机器人 Domain 实体
|
||||
class ChatBot {
|
||||
final int id;
|
||||
final String? name;
|
||||
final String? username;
|
||||
final int? botUserId;
|
||||
final String? icon;
|
||||
final String? iconGaussian;
|
||||
final String? description;
|
||||
final String? token;
|
||||
final int? flag;
|
||||
final int? status;
|
||||
final String? webhook;
|
||||
final String? commands;
|
||||
final String? banner;
|
||||
final int? channelId;
|
||||
final int? channelGroupId;
|
||||
final int? deletedAt;
|
||||
final String? internalWebhook;
|
||||
final int? mode;
|
||||
final String? redirectUrl;
|
||||
final int? isInvitable;
|
||||
final int? isAllowForward;
|
||||
final String? tips;
|
||||
|
||||
const ChatBot({
|
||||
required this.id,
|
||||
this.name,
|
||||
this.username,
|
||||
this.botUserId,
|
||||
this.icon,
|
||||
this.iconGaussian,
|
||||
this.description,
|
||||
this.token,
|
||||
this.flag,
|
||||
this.status,
|
||||
this.webhook,
|
||||
this.commands,
|
||||
this.banner,
|
||||
this.channelId,
|
||||
this.channelGroupId,
|
||||
this.deletedAt,
|
||||
this.internalWebhook,
|
||||
this.mode,
|
||||
this.redirectUrl,
|
||||
this.isInvitable,
|
||||
this.isAllowForward,
|
||||
this.tips,
|
||||
});
|
||||
|
||||
ChatBot copyWith({
|
||||
int? id,
|
||||
String? name,
|
||||
String? username,
|
||||
int? botUserId,
|
||||
String? icon,
|
||||
String? iconGaussian,
|
||||
String? description,
|
||||
String? token,
|
||||
int? flag,
|
||||
int? status,
|
||||
String? webhook,
|
||||
String? commands,
|
||||
String? banner,
|
||||
int? channelId,
|
||||
int? channelGroupId,
|
||||
int? deletedAt,
|
||||
String? internalWebhook,
|
||||
int? mode,
|
||||
String? redirectUrl,
|
||||
int? isInvitable,
|
||||
int? isAllowForward,
|
||||
String? tips,
|
||||
}) {
|
||||
return ChatBot(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
username: username ?? this.username,
|
||||
botUserId: botUserId ?? this.botUserId,
|
||||
icon: icon ?? this.icon,
|
||||
iconGaussian: iconGaussian ?? this.iconGaussian,
|
||||
description: description ?? this.description,
|
||||
token: token ?? this.token,
|
||||
flag: flag ?? this.flag,
|
||||
status: status ?? this.status,
|
||||
webhook: webhook ?? this.webhook,
|
||||
commands: commands ?? this.commands,
|
||||
banner: banner ?? this.banner,
|
||||
channelId: channelId ?? this.channelId,
|
||||
channelGroupId: channelGroupId ?? this.channelGroupId,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
internalWebhook: internalWebhook ?? this.internalWebhook,
|
||||
mode: mode ?? this.mode,
|
||||
redirectUrl: redirectUrl ?? this.redirectUrl,
|
||||
isInvitable: isInvitable ?? this.isInvitable,
|
||||
isAllowForward: isAllowForward ?? this.isAllowForward,
|
||||
tips: tips ?? this.tips,
|
||||
);
|
||||
}
|
||||
}
|
||||
48
apps/im_app/lib/domain/entities/chat_category.dart
Normal file
48
apps/im_app/lib/domain/entities/chat_category.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
/// 聊天分类 Domain 实体
|
||||
class ChatCategory {
|
||||
final int id;
|
||||
final String? name;
|
||||
final String? includedChatIds;
|
||||
final String? excludedChatIds;
|
||||
final int? seq;
|
||||
final int isHide;
|
||||
final int createdAt;
|
||||
final int updatedAt;
|
||||
final int deletedAt;
|
||||
|
||||
const ChatCategory({
|
||||
required this.id,
|
||||
this.name,
|
||||
this.includedChatIds,
|
||||
this.excludedChatIds,
|
||||
this.seq,
|
||||
this.isHide = 0,
|
||||
this.createdAt = 0,
|
||||
this.updatedAt = 0,
|
||||
this.deletedAt = 0,
|
||||
});
|
||||
|
||||
ChatCategory copyWith({
|
||||
int? id,
|
||||
String? name,
|
||||
String? includedChatIds,
|
||||
String? excludedChatIds,
|
||||
int? seq,
|
||||
int? isHide,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
}) {
|
||||
return ChatCategory(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
includedChatIds: includedChatIds ?? this.includedChatIds,
|
||||
excludedChatIds: excludedChatIds ?? this.excludedChatIds,
|
||||
seq: seq ?? this.seq,
|
||||
isHide: isHide ?? this.isHide,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
);
|
||||
}
|
||||
}
|
||||
112
apps/im_app/lib/domain/entities/discover_mini_app.dart
Normal file
112
apps/im_app/lib/domain/entities/discover_mini_app.dart
Normal file
@@ -0,0 +1,112 @@
|
||||
/// 发现小程序 Domain 实体
|
||||
class DiscoverMiniApp {
|
||||
final String id;
|
||||
final String? name;
|
||||
final String? openuid;
|
||||
final String? devId;
|
||||
final String? icon;
|
||||
final String? iconGaussian;
|
||||
final String? downloadUrl;
|
||||
final String? description;
|
||||
final int? version;
|
||||
final int? typ;
|
||||
final int? flag;
|
||||
final int? reviewStatus;
|
||||
final int? favoriteAt;
|
||||
final int? isActive;
|
||||
final int? createdAt;
|
||||
final int? updatedAt;
|
||||
final int? deletedAt;
|
||||
final double? score;
|
||||
final String? channels;
|
||||
final String? devName;
|
||||
final String? pictureGaussian;
|
||||
final String? picture;
|
||||
final int? commentNum;
|
||||
final String? lastLoginAt;
|
||||
final String? screen;
|
||||
|
||||
const DiscoverMiniApp({
|
||||
required this.id,
|
||||
this.name,
|
||||
this.openuid,
|
||||
this.devId,
|
||||
this.icon,
|
||||
this.iconGaussian,
|
||||
this.downloadUrl,
|
||||
this.description,
|
||||
this.version,
|
||||
this.typ,
|
||||
this.flag,
|
||||
this.reviewStatus,
|
||||
this.favoriteAt,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.deletedAt,
|
||||
this.score,
|
||||
this.channels,
|
||||
this.devName,
|
||||
this.pictureGaussian,
|
||||
this.picture,
|
||||
this.commentNum,
|
||||
this.lastLoginAt,
|
||||
this.screen,
|
||||
});
|
||||
|
||||
DiscoverMiniApp copyWith({
|
||||
String? id,
|
||||
String? name,
|
||||
String? openuid,
|
||||
String? devId,
|
||||
String? icon,
|
||||
String? iconGaussian,
|
||||
String? downloadUrl,
|
||||
String? description,
|
||||
int? version,
|
||||
int? typ,
|
||||
int? flag,
|
||||
int? reviewStatus,
|
||||
int? favoriteAt,
|
||||
int? isActive,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
double? score,
|
||||
String? channels,
|
||||
String? devName,
|
||||
String? pictureGaussian,
|
||||
String? picture,
|
||||
int? commentNum,
|
||||
String? lastLoginAt,
|
||||
String? screen,
|
||||
}) {
|
||||
return DiscoverMiniApp(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
openuid: openuid ?? this.openuid,
|
||||
devId: devId ?? this.devId,
|
||||
icon: icon ?? this.icon,
|
||||
iconGaussian: iconGaussian ?? this.iconGaussian,
|
||||
downloadUrl: downloadUrl ?? this.downloadUrl,
|
||||
description: description ?? this.description,
|
||||
version: version ?? this.version,
|
||||
typ: typ ?? this.typ,
|
||||
flag: flag ?? this.flag,
|
||||
reviewStatus: reviewStatus ?? this.reviewStatus,
|
||||
favoriteAt: favoriteAt ?? this.favoriteAt,
|
||||
isActive: isActive ?? this.isActive,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
score: score ?? this.score,
|
||||
channels: channels ?? this.channels,
|
||||
devName: devName ?? this.devName,
|
||||
pictureGaussian: pictureGaussian ?? this.pictureGaussian,
|
||||
picture: picture ?? this.picture,
|
||||
commentNum: commentNum ?? this.commentNum,
|
||||
lastLoginAt: lastLoginAt ?? this.lastLoginAt,
|
||||
screen: screen ?? this.screen,
|
||||
);
|
||||
}
|
||||
}
|
||||
112
apps/im_app/lib/domain/entities/explore_mini_app.dart
Normal file
112
apps/im_app/lib/domain/entities/explore_mini_app.dart
Normal file
@@ -0,0 +1,112 @@
|
||||
/// 探索小程序 Domain 实体
|
||||
class ExploreMiniApp {
|
||||
final String id;
|
||||
final String? name;
|
||||
final String? openuid;
|
||||
final String? devId;
|
||||
final String? icon;
|
||||
final String? iconGaussian;
|
||||
final String? downloadUrl;
|
||||
final String? description;
|
||||
final int? version;
|
||||
final int? typ;
|
||||
final int? flag;
|
||||
final int? reviewStatus;
|
||||
final int? favoriteAt;
|
||||
final int? isActive;
|
||||
final int? createdAt;
|
||||
final int? updatedAt;
|
||||
final int? deletedAt;
|
||||
final double? score;
|
||||
final String? channels;
|
||||
final String? devName;
|
||||
final String? pictureGaussian;
|
||||
final String? picture;
|
||||
final int? commentNum;
|
||||
final int? lastLoginAt;
|
||||
final String? screen;
|
||||
|
||||
const ExploreMiniApp({
|
||||
required this.id,
|
||||
this.name,
|
||||
this.openuid,
|
||||
this.devId,
|
||||
this.icon,
|
||||
this.iconGaussian,
|
||||
this.downloadUrl,
|
||||
this.description,
|
||||
this.version,
|
||||
this.typ,
|
||||
this.flag,
|
||||
this.reviewStatus,
|
||||
this.favoriteAt,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.deletedAt,
|
||||
this.score,
|
||||
this.channels,
|
||||
this.devName,
|
||||
this.pictureGaussian,
|
||||
this.picture,
|
||||
this.commentNum,
|
||||
this.lastLoginAt,
|
||||
this.screen,
|
||||
});
|
||||
|
||||
ExploreMiniApp copyWith({
|
||||
String? id,
|
||||
String? name,
|
||||
String? openuid,
|
||||
String? devId,
|
||||
String? icon,
|
||||
String? iconGaussian,
|
||||
String? downloadUrl,
|
||||
String? description,
|
||||
int? version,
|
||||
int? typ,
|
||||
int? flag,
|
||||
int? reviewStatus,
|
||||
int? favoriteAt,
|
||||
int? isActive,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
double? score,
|
||||
String? channels,
|
||||
String? devName,
|
||||
String? pictureGaussian,
|
||||
String? picture,
|
||||
int? commentNum,
|
||||
int? lastLoginAt,
|
||||
String? screen,
|
||||
}) {
|
||||
return ExploreMiniApp(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
openuid: openuid ?? this.openuid,
|
||||
devId: devId ?? this.devId,
|
||||
icon: icon ?? this.icon,
|
||||
iconGaussian: iconGaussian ?? this.iconGaussian,
|
||||
downloadUrl: downloadUrl ?? this.downloadUrl,
|
||||
description: description ?? this.description,
|
||||
version: version ?? this.version,
|
||||
typ: typ ?? this.typ,
|
||||
flag: flag ?? this.flag,
|
||||
reviewStatus: reviewStatus ?? this.reviewStatus,
|
||||
favoriteAt: favoriteAt ?? this.favoriteAt,
|
||||
isActive: isActive ?? this.isActive,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
score: score ?? this.score,
|
||||
channels: channels ?? this.channels,
|
||||
devName: devName ?? this.devName,
|
||||
pictureGaussian: pictureGaussian ?? this.pictureGaussian,
|
||||
picture: picture ?? this.picture,
|
||||
commentNum: commentNum ?? this.commentNum,
|
||||
lastLoginAt: lastLoginAt ?? this.lastLoginAt,
|
||||
screen: screen ?? this.screen,
|
||||
);
|
||||
}
|
||||
}
|
||||
112
apps/im_app/lib/domain/entities/favorite_mini_app.dart
Normal file
112
apps/im_app/lib/domain/entities/favorite_mini_app.dart
Normal file
@@ -0,0 +1,112 @@
|
||||
/// 收藏小程序 Domain 实体
|
||||
class FavoriteMiniApp {
|
||||
final String id;
|
||||
final String? name;
|
||||
final String? openuid;
|
||||
final String? devId;
|
||||
final String? icon;
|
||||
final String? iconGaussian;
|
||||
final String? downloadUrl;
|
||||
final String? description;
|
||||
final int? version;
|
||||
final int? typ;
|
||||
final int? flag;
|
||||
final int? reviewStatus;
|
||||
final int? favoriteAt;
|
||||
final int? isActive;
|
||||
final int? createdAt;
|
||||
final int? updatedAt;
|
||||
final int? deletedAt;
|
||||
final double? score;
|
||||
final String? channels;
|
||||
final String? devName;
|
||||
final String? pictureGaussian;
|
||||
final String? picture;
|
||||
final int? commentNum;
|
||||
final int? lastLoginAt;
|
||||
final String? screen;
|
||||
|
||||
const FavoriteMiniApp({
|
||||
required this.id,
|
||||
this.name,
|
||||
this.openuid,
|
||||
this.devId,
|
||||
this.icon,
|
||||
this.iconGaussian,
|
||||
this.downloadUrl,
|
||||
this.description,
|
||||
this.version,
|
||||
this.typ,
|
||||
this.flag,
|
||||
this.reviewStatus,
|
||||
this.favoriteAt,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.deletedAt,
|
||||
this.score,
|
||||
this.channels,
|
||||
this.devName,
|
||||
this.pictureGaussian,
|
||||
this.picture,
|
||||
this.commentNum,
|
||||
this.lastLoginAt,
|
||||
this.screen,
|
||||
});
|
||||
|
||||
FavoriteMiniApp copyWith({
|
||||
String? id,
|
||||
String? name,
|
||||
String? openuid,
|
||||
String? devId,
|
||||
String? icon,
|
||||
String? iconGaussian,
|
||||
String? downloadUrl,
|
||||
String? description,
|
||||
int? version,
|
||||
int? typ,
|
||||
int? flag,
|
||||
int? reviewStatus,
|
||||
int? favoriteAt,
|
||||
int? isActive,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
double? score,
|
||||
String? channels,
|
||||
String? devName,
|
||||
String? pictureGaussian,
|
||||
String? picture,
|
||||
int? commentNum,
|
||||
int? lastLoginAt,
|
||||
String? screen,
|
||||
}) {
|
||||
return FavoriteMiniApp(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
openuid: openuid ?? this.openuid,
|
||||
devId: devId ?? this.devId,
|
||||
icon: icon ?? this.icon,
|
||||
iconGaussian: iconGaussian ?? this.iconGaussian,
|
||||
downloadUrl: downloadUrl ?? this.downloadUrl,
|
||||
description: description ?? this.description,
|
||||
version: version ?? this.version,
|
||||
typ: typ ?? this.typ,
|
||||
flag: flag ?? this.flag,
|
||||
reviewStatus: reviewStatus ?? this.reviewStatus,
|
||||
favoriteAt: favoriteAt ?? this.favoriteAt,
|
||||
isActive: isActive ?? this.isActive,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
score: score ?? this.score,
|
||||
channels: channels ?? this.channels,
|
||||
devName: devName ?? this.devName,
|
||||
pictureGaussian: pictureGaussian ?? this.pictureGaussian,
|
||||
picture: picture ?? this.picture,
|
||||
commentNum: commentNum ?? this.commentNum,
|
||||
lastLoginAt: lastLoginAt ?? this.lastLoginAt,
|
||||
screen: screen ?? this.screen,
|
||||
);
|
||||
}
|
||||
}
|
||||
72
apps/im_app/lib/domain/entities/favourite.dart
Normal file
72
apps/im_app/lib/domain/entities/favourite.dart
Normal file
@@ -0,0 +1,72 @@
|
||||
/// 收藏 Domain 实体
|
||||
class Favourite {
|
||||
final int id;
|
||||
final String parentId;
|
||||
final String data;
|
||||
final int createdAt;
|
||||
final int updatedAt;
|
||||
final int deletedAt;
|
||||
final int? source;
|
||||
final int? userId;
|
||||
final int? authorId;
|
||||
final String typ;
|
||||
final String tag;
|
||||
final int isPin;
|
||||
final int chatTyp;
|
||||
final int isUploaded;
|
||||
final String urls;
|
||||
|
||||
const Favourite({
|
||||
required this.id,
|
||||
this.parentId = '',
|
||||
this.data = '',
|
||||
this.createdAt = 0,
|
||||
this.updatedAt = 0,
|
||||
this.deletedAt = 0,
|
||||
this.source,
|
||||
this.userId,
|
||||
this.authorId,
|
||||
this.typ = '[]',
|
||||
this.tag = '[]',
|
||||
this.isPin = 0,
|
||||
this.chatTyp = 0,
|
||||
this.isUploaded = 1,
|
||||
this.urls = '[]',
|
||||
});
|
||||
|
||||
Favourite copyWith({
|
||||
int? id,
|
||||
String? parentId,
|
||||
String? data,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
int? source,
|
||||
int? userId,
|
||||
int? authorId,
|
||||
String? typ,
|
||||
String? tag,
|
||||
int? isPin,
|
||||
int? chatTyp,
|
||||
int? isUploaded,
|
||||
String? urls,
|
||||
}) {
|
||||
return Favourite(
|
||||
id: id ?? this.id,
|
||||
parentId: parentId ?? this.parentId,
|
||||
data: data ?? this.data,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
source: source ?? this.source,
|
||||
userId: userId ?? this.userId,
|
||||
authorId: authorId ?? this.authorId,
|
||||
typ: typ ?? this.typ,
|
||||
tag: tag ?? this.tag,
|
||||
isPin: isPin ?? this.isPin,
|
||||
chatTyp: chatTyp ?? this.chatTyp,
|
||||
isUploaded: isUploaded ?? this.isUploaded,
|
||||
urls: urls ?? this.urls,
|
||||
);
|
||||
}
|
||||
}
|
||||
44
apps/im_app/lib/domain/entities/favourite_detail.dart
Normal file
44
apps/im_app/lib/domain/entities/favourite_detail.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
/// 收藏详情 Domain 实体
|
||||
class FavouriteDetail {
|
||||
final int? id;
|
||||
final String relatedId;
|
||||
final String content;
|
||||
final int? typ;
|
||||
final int? messageId;
|
||||
final int? sendId;
|
||||
final int? chatId;
|
||||
final int? sendTime;
|
||||
|
||||
const FavouriteDetail({
|
||||
this.id,
|
||||
this.relatedId = '',
|
||||
this.content = '',
|
||||
this.typ,
|
||||
this.messageId,
|
||||
this.sendId,
|
||||
this.chatId,
|
||||
this.sendTime,
|
||||
});
|
||||
|
||||
FavouriteDetail copyWith({
|
||||
int? id,
|
||||
String? relatedId,
|
||||
String? content,
|
||||
int? typ,
|
||||
int? messageId,
|
||||
int? sendId,
|
||||
int? chatId,
|
||||
int? sendTime,
|
||||
}) {
|
||||
return FavouriteDetail(
|
||||
id: id ?? this.id,
|
||||
relatedId: relatedId ?? this.relatedId,
|
||||
content: content ?? this.content,
|
||||
typ: typ ?? this.typ,
|
||||
messageId: messageId ?? this.messageId,
|
||||
sendId: sendId ?? this.sendId,
|
||||
chatId: chatId ?? this.chatId,
|
||||
sendTime: sendTime ?? this.sendTime,
|
||||
);
|
||||
}
|
||||
}
|
||||
124
apps/im_app/lib/domain/entities/group.dart
Normal file
124
apps/im_app/lib/domain/entities/group.dart
Normal file
@@ -0,0 +1,124 @@
|
||||
/// 群组 Domain 实体
|
||||
class Group {
|
||||
final int id;
|
||||
final int? userJoinDate;
|
||||
final String? name;
|
||||
final String? profile;
|
||||
final String? icon;
|
||||
final String iconGaussian;
|
||||
final int? permission;
|
||||
final int? admin;
|
||||
final String? members;
|
||||
final int? owner;
|
||||
final String? admins;
|
||||
final int? visible;
|
||||
final int? speakInterval;
|
||||
final int? groupType;
|
||||
final int? roomType;
|
||||
final int? maxNumber;
|
||||
final int? channelId;
|
||||
final int? channelGroupId;
|
||||
final int? createTime;
|
||||
final int? updateTime;
|
||||
final int? addIndex;
|
||||
final int? maxMember;
|
||||
final int? expireTime;
|
||||
final int workspaceId;
|
||||
final int mode;
|
||||
final int redpacketPlay;
|
||||
final String? topic;
|
||||
final String? rp;
|
||||
|
||||
const Group({
|
||||
required this.id,
|
||||
this.userJoinDate,
|
||||
this.name,
|
||||
this.profile,
|
||||
this.icon,
|
||||
this.iconGaussian = '',
|
||||
this.permission,
|
||||
this.admin,
|
||||
this.members,
|
||||
this.owner,
|
||||
this.admins,
|
||||
this.visible,
|
||||
this.speakInterval,
|
||||
this.groupType,
|
||||
this.roomType,
|
||||
this.maxNumber,
|
||||
this.channelId,
|
||||
this.channelGroupId,
|
||||
this.createTime,
|
||||
this.updateTime,
|
||||
this.addIndex,
|
||||
this.maxMember,
|
||||
this.expireTime,
|
||||
this.workspaceId = 0,
|
||||
this.mode = 0,
|
||||
this.redpacketPlay = 0,
|
||||
this.topic,
|
||||
this.rp,
|
||||
});
|
||||
|
||||
Group copyWith({
|
||||
int? id,
|
||||
int? userJoinDate,
|
||||
String? name,
|
||||
String? profile,
|
||||
String? icon,
|
||||
String? iconGaussian,
|
||||
int? permission,
|
||||
int? admin,
|
||||
String? members,
|
||||
int? owner,
|
||||
String? admins,
|
||||
int? visible,
|
||||
int? speakInterval,
|
||||
int? groupType,
|
||||
int? roomType,
|
||||
int? maxNumber,
|
||||
int? channelId,
|
||||
int? channelGroupId,
|
||||
int? createTime,
|
||||
int? updateTime,
|
||||
int? addIndex,
|
||||
int? maxMember,
|
||||
int? expireTime,
|
||||
int? workspaceId,
|
||||
int? mode,
|
||||
int? redpacketPlay,
|
||||
String? topic,
|
||||
String? rp,
|
||||
}) {
|
||||
return Group(
|
||||
id: id ?? this.id,
|
||||
userJoinDate: userJoinDate ?? this.userJoinDate,
|
||||
name: name ?? this.name,
|
||||
profile: profile ?? this.profile,
|
||||
icon: icon ?? this.icon,
|
||||
iconGaussian: iconGaussian ?? this.iconGaussian,
|
||||
permission: permission ?? this.permission,
|
||||
admin: admin ?? this.admin,
|
||||
members: members ?? this.members,
|
||||
owner: owner ?? this.owner,
|
||||
admins: admins ?? this.admins,
|
||||
visible: visible ?? this.visible,
|
||||
speakInterval: speakInterval ?? this.speakInterval,
|
||||
groupType: groupType ?? this.groupType,
|
||||
roomType: roomType ?? this.roomType,
|
||||
maxNumber: maxNumber ?? this.maxNumber,
|
||||
channelId: channelId ?? this.channelId,
|
||||
channelGroupId: channelGroupId ?? this.channelGroupId,
|
||||
createTime: createTime ?? this.createTime,
|
||||
updateTime: updateTime ?? this.updateTime,
|
||||
addIndex: addIndex ?? this.addIndex,
|
||||
maxMember: maxMember ?? this.maxMember,
|
||||
expireTime: expireTime ?? this.expireTime,
|
||||
workspaceId: workspaceId ?? this.workspaceId,
|
||||
mode: mode ?? this.mode,
|
||||
redpacketPlay: redpacketPlay ?? this.redpacketPlay,
|
||||
topic: topic ?? this.topic,
|
||||
rp: rp ?? this.rp,
|
||||
);
|
||||
}
|
||||
}
|
||||
76
apps/im_app/lib/domain/entities/message.dart
Normal file
76
apps/im_app/lib/domain/entities/message.dart
Normal file
@@ -0,0 +1,76 @@
|
||||
/// 消息 Domain 实体
|
||||
class Message {
|
||||
final int id;
|
||||
final int? messageId;
|
||||
final int? chatId;
|
||||
final int? chatIdx;
|
||||
final int? sendId;
|
||||
final String? content;
|
||||
final int? typ;
|
||||
final int? sendTime;
|
||||
final int? expireTime;
|
||||
final int? createTime;
|
||||
final String? atUsers;
|
||||
final String emojis;
|
||||
final int editTime;
|
||||
final int refTyp;
|
||||
final int flag;
|
||||
final String cmid;
|
||||
|
||||
const Message({
|
||||
required this.id,
|
||||
this.messageId,
|
||||
this.chatId,
|
||||
this.chatIdx,
|
||||
this.sendId,
|
||||
this.content,
|
||||
this.typ,
|
||||
this.sendTime,
|
||||
this.expireTime,
|
||||
this.createTime,
|
||||
this.atUsers,
|
||||
this.emojis = '[]',
|
||||
this.editTime = 0,
|
||||
this.refTyp = 0,
|
||||
this.flag = 0,
|
||||
this.cmid = '',
|
||||
});
|
||||
|
||||
Message copyWith({
|
||||
int? id,
|
||||
int? messageId,
|
||||
int? chatId,
|
||||
int? chatIdx,
|
||||
int? sendId,
|
||||
String? content,
|
||||
int? typ,
|
||||
int? sendTime,
|
||||
int? expireTime,
|
||||
int? createTime,
|
||||
String? atUsers,
|
||||
String? emojis,
|
||||
int? editTime,
|
||||
int? refTyp,
|
||||
int? flag,
|
||||
String? cmid,
|
||||
}) {
|
||||
return Message(
|
||||
id: id ?? this.id,
|
||||
messageId: messageId ?? this.messageId,
|
||||
chatId: chatId ?? this.chatId,
|
||||
chatIdx: chatIdx ?? this.chatIdx,
|
||||
sendId: sendId ?? this.sendId,
|
||||
content: content ?? this.content,
|
||||
typ: typ ?? this.typ,
|
||||
sendTime: sendTime ?? this.sendTime,
|
||||
expireTime: expireTime ?? this.expireTime,
|
||||
createTime: createTime ?? this.createTime,
|
||||
atUsers: atUsers ?? this.atUsers,
|
||||
emojis: emojis ?? this.emojis,
|
||||
editTime: editTime ?? this.editTime,
|
||||
refTyp: refTyp ?? this.refTyp,
|
||||
flag: flag ?? this.flag,
|
||||
cmid: cmid ?? this.cmid,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/// 待处理好友请求历史 Domain 实体
|
||||
class PendingFriendRequestHistory {
|
||||
final int id;
|
||||
final int uid;
|
||||
final int requestTime;
|
||||
final String? remarks;
|
||||
final String? source;
|
||||
final int? rs;
|
||||
|
||||
const PendingFriendRequestHistory({
|
||||
required this.id,
|
||||
required this.uid,
|
||||
required this.requestTime,
|
||||
this.remarks,
|
||||
this.source,
|
||||
this.rs,
|
||||
});
|
||||
|
||||
PendingFriendRequestHistory copyWith({
|
||||
int? id,
|
||||
int? uid,
|
||||
int? requestTime,
|
||||
String? remarks,
|
||||
String? source,
|
||||
int? rs,
|
||||
}) {
|
||||
return PendingFriendRequestHistory(
|
||||
id: id ?? this.id,
|
||||
uid: uid ?? this.uid,
|
||||
requestTime: requestTime ?? this.requestTime,
|
||||
remarks: remarks ?? this.remarks,
|
||||
source: source ?? this.source,
|
||||
rs: rs ?? this.rs,
|
||||
);
|
||||
}
|
||||
}
|
||||
112
apps/im_app/lib/domain/entities/recent_mini_app.dart
Normal file
112
apps/im_app/lib/domain/entities/recent_mini_app.dart
Normal file
@@ -0,0 +1,112 @@
|
||||
/// 最近小程序 Domain 实体
|
||||
class RecentMiniApp {
|
||||
final String id;
|
||||
final String? name;
|
||||
final String? openuid;
|
||||
final String? devId;
|
||||
final String? icon;
|
||||
final String? iconGaussian;
|
||||
final String? downloadUrl;
|
||||
final String? description;
|
||||
final int? version;
|
||||
final int? typ;
|
||||
final int? flag;
|
||||
final int? reviewStatus;
|
||||
final int? favoriteAt;
|
||||
final int? isActive;
|
||||
final int? createdAt;
|
||||
final int? updatedAt;
|
||||
final int? deletedAt;
|
||||
final double? score;
|
||||
final String? channels;
|
||||
final String? devName;
|
||||
final String? pictureGaussian;
|
||||
final String? picture;
|
||||
final int? commentNum;
|
||||
final int? lastLoginAt;
|
||||
final String? screen;
|
||||
|
||||
const RecentMiniApp({
|
||||
required this.id,
|
||||
this.name,
|
||||
this.openuid,
|
||||
this.devId,
|
||||
this.icon,
|
||||
this.iconGaussian,
|
||||
this.downloadUrl,
|
||||
this.description,
|
||||
this.version,
|
||||
this.typ,
|
||||
this.flag,
|
||||
this.reviewStatus,
|
||||
this.favoriteAt,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.deletedAt,
|
||||
this.score,
|
||||
this.channels,
|
||||
this.devName,
|
||||
this.pictureGaussian,
|
||||
this.picture,
|
||||
this.commentNum,
|
||||
this.lastLoginAt,
|
||||
this.screen,
|
||||
});
|
||||
|
||||
RecentMiniApp copyWith({
|
||||
String? id,
|
||||
String? name,
|
||||
String? openuid,
|
||||
String? devId,
|
||||
String? icon,
|
||||
String? iconGaussian,
|
||||
String? downloadUrl,
|
||||
String? description,
|
||||
int? version,
|
||||
int? typ,
|
||||
int? flag,
|
||||
int? reviewStatus,
|
||||
int? favoriteAt,
|
||||
int? isActive,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
double? score,
|
||||
String? channels,
|
||||
String? devName,
|
||||
String? pictureGaussian,
|
||||
String? picture,
|
||||
int? commentNum,
|
||||
int? lastLoginAt,
|
||||
String? screen,
|
||||
}) {
|
||||
return RecentMiniApp(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
openuid: openuid ?? this.openuid,
|
||||
devId: devId ?? this.devId,
|
||||
icon: icon ?? this.icon,
|
||||
iconGaussian: iconGaussian ?? this.iconGaussian,
|
||||
downloadUrl: downloadUrl ?? this.downloadUrl,
|
||||
description: description ?? this.description,
|
||||
version: version ?? this.version,
|
||||
typ: typ ?? this.typ,
|
||||
flag: flag ?? this.flag,
|
||||
reviewStatus: reviewStatus ?? this.reviewStatus,
|
||||
favoriteAt: favoriteAt ?? this.favoriteAt,
|
||||
isActive: isActive ?? this.isActive,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
score: score ?? this.score,
|
||||
channels: channels ?? this.channels,
|
||||
devName: devName ?? this.devName,
|
||||
pictureGaussian: pictureGaussian ?? this.pictureGaussian,
|
||||
picture: picture ?? this.picture,
|
||||
commentNum: commentNum ?? this.commentNum,
|
||||
lastLoginAt: lastLoginAt ?? this.lastLoginAt,
|
||||
screen: screen ?? this.screen,
|
||||
);
|
||||
}
|
||||
}
|
||||
60
apps/im_app/lib/domain/entities/retry.dart
Normal file
60
apps/im_app/lib/domain/entities/retry.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
/// 重试 Domain 实体
|
||||
class Retry {
|
||||
final int? id;
|
||||
final int? uid;
|
||||
final String apiType;
|
||||
final String endPoint;
|
||||
final String requestData;
|
||||
final int? synced;
|
||||
final String callbackFun;
|
||||
final int? expired;
|
||||
final int? replace;
|
||||
final int? expireTime;
|
||||
final int? createTime;
|
||||
final int? addIndex;
|
||||
|
||||
const Retry({
|
||||
this.id,
|
||||
this.uid,
|
||||
this.apiType = '',
|
||||
this.endPoint = '',
|
||||
this.requestData = '',
|
||||
this.synced,
|
||||
this.callbackFun = '',
|
||||
this.expired,
|
||||
this.replace,
|
||||
this.expireTime,
|
||||
this.createTime,
|
||||
this.addIndex,
|
||||
});
|
||||
|
||||
Retry copyWith({
|
||||
int? id,
|
||||
int? uid,
|
||||
String? apiType,
|
||||
String? endPoint,
|
||||
String? requestData,
|
||||
int? synced,
|
||||
String? callbackFun,
|
||||
int? expired,
|
||||
int? replace,
|
||||
int? expireTime,
|
||||
int? createTime,
|
||||
int? addIndex,
|
||||
}) {
|
||||
return Retry(
|
||||
id: id ?? this.id,
|
||||
uid: uid ?? this.uid,
|
||||
apiType: apiType ?? this.apiType,
|
||||
endPoint: endPoint ?? this.endPoint,
|
||||
requestData: requestData ?? this.requestData,
|
||||
synced: synced ?? this.synced,
|
||||
callbackFun: callbackFun ?? this.callbackFun,
|
||||
expired: expired ?? this.expired,
|
||||
replace: replace ?? this.replace,
|
||||
expireTime: expireTime ?? this.expireTime,
|
||||
createTime: createTime ?? this.createTime,
|
||||
addIndex: addIndex ?? this.addIndex,
|
||||
);
|
||||
}
|
||||
}
|
||||
48
apps/im_app/lib/domain/entities/sound.dart
Normal file
48
apps/im_app/lib/domain/entities/sound.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
/// 音效 Domain 实体
|
||||
class Sound {
|
||||
final int id;
|
||||
final String filePath;
|
||||
final int typ;
|
||||
final String name;
|
||||
final int createdAt;
|
||||
final int updatedAt;
|
||||
final int deletedAt;
|
||||
final int channelGroupId;
|
||||
final int isDefault;
|
||||
|
||||
const Sound({
|
||||
required this.id,
|
||||
this.filePath = '',
|
||||
required this.typ,
|
||||
this.name = '',
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
this.deletedAt = 0,
|
||||
required this.channelGroupId,
|
||||
required this.isDefault,
|
||||
});
|
||||
|
||||
Sound copyWith({
|
||||
int? id,
|
||||
String? filePath,
|
||||
int? typ,
|
||||
String? name,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
int? channelGroupId,
|
||||
int? isDefault,
|
||||
}) {
|
||||
return Sound(
|
||||
id: id ?? this.id,
|
||||
filePath: filePath ?? this.filePath,
|
||||
typ: typ ?? this.typ,
|
||||
name: name ?? this.name,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
channelGroupId: channelGroupId ?? this.channelGroupId,
|
||||
isDefault: isDefault ?? this.isDefault,
|
||||
);
|
||||
}
|
||||
}
|
||||
40
apps/im_app/lib/domain/entities/tag.dart
Normal file
40
apps/im_app/lib/domain/entities/tag.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
/// 标签 Domain 实体
|
||||
class Tag {
|
||||
final int? id;
|
||||
final int? uid;
|
||||
final String name;
|
||||
final int? type;
|
||||
final int? createdAt;
|
||||
final int? updatedAt;
|
||||
final int? addIndex;
|
||||
|
||||
const Tag({
|
||||
this.id,
|
||||
this.uid,
|
||||
this.name = '',
|
||||
this.type,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.addIndex,
|
||||
});
|
||||
|
||||
Tag copyWith({
|
||||
int? id,
|
||||
int? uid,
|
||||
String? name,
|
||||
int? type,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? addIndex,
|
||||
}) {
|
||||
return Tag(
|
||||
id: id ?? this.id,
|
||||
uid: uid ?? this.uid,
|
||||
name: name ?? this.name,
|
||||
type: type ?? this.type,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
addIndex: addIndex ?? this.addIndex,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -14,15 +14,81 @@
|
||||
/// → View 渲染
|
||||
/// ```
|
||||
class User {
|
||||
final String id;
|
||||
final String email;
|
||||
final int uid;
|
||||
final String? uuid;
|
||||
final int? lastOnline;
|
||||
final String? profilePic;
|
||||
final String? profilePicGaussian;
|
||||
final String? nickname;
|
||||
final String? avatar;
|
||||
final String? contact;
|
||||
final String? countryCode;
|
||||
final String? email;
|
||||
final String? recoveryEmail;
|
||||
final String? username;
|
||||
final String? bio;
|
||||
final int? relationship;
|
||||
final String? userAlias;
|
||||
final int? channelId;
|
||||
final int? channelGroupId;
|
||||
final String? hint;
|
||||
|
||||
const User({
|
||||
required this.id,
|
||||
required this.email,
|
||||
required this.uid,
|
||||
this.uuid,
|
||||
this.lastOnline,
|
||||
this.profilePic,
|
||||
this.profilePicGaussian,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.contact,
|
||||
this.countryCode,
|
||||
this.email,
|
||||
this.recoveryEmail,
|
||||
this.username,
|
||||
this.bio,
|
||||
this.relationship,
|
||||
this.userAlias,
|
||||
this.channelId,
|
||||
this.channelGroupId,
|
||||
this.hint,
|
||||
});
|
||||
|
||||
User copyWith({
|
||||
int? uid,
|
||||
String? uuid,
|
||||
int? lastOnline,
|
||||
String? profilePic,
|
||||
String? profilePicGaussian,
|
||||
String? nickname,
|
||||
String? contact,
|
||||
String? countryCode,
|
||||
String? email,
|
||||
String? recoveryEmail,
|
||||
String? username,
|
||||
String? bio,
|
||||
int? relationship,
|
||||
String? userAlias,
|
||||
int? channelId,
|
||||
int? channelGroupId,
|
||||
String? hint,
|
||||
}) {
|
||||
return User(
|
||||
uid: uid ?? this.uid,
|
||||
uuid: uuid ?? this.uuid,
|
||||
lastOnline: lastOnline ?? this.lastOnline,
|
||||
profilePic: profilePic ?? this.profilePic,
|
||||
profilePicGaussian: profilePicGaussian ?? this.profilePicGaussian,
|
||||
nickname: nickname ?? this.nickname,
|
||||
contact: contact ?? this.contact,
|
||||
countryCode: countryCode ?? this.countryCode,
|
||||
email: email ?? this.email,
|
||||
recoveryEmail: recoveryEmail ?? this.recoveryEmail,
|
||||
username: username ?? this.username,
|
||||
bio: bio ?? this.bio,
|
||||
relationship: relationship ?? this.relationship,
|
||||
userAlias: userAlias ?? this.userAlias,
|
||||
channelId: channelId ?? this.channelId,
|
||||
channelGroupId: channelGroupId ?? this.channelGroupId,
|
||||
hint: hint ?? this.hint,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
16
apps/im_app/lib/domain/entities/user_request_history.dart
Normal file
16
apps/im_app/lib/domain/entities/user_request_history.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
/// 用户请求历史 Domain 实体
|
||||
class UserRequestHistory {
|
||||
final int id;
|
||||
final int? status;
|
||||
final int? createdAt;
|
||||
|
||||
const UserRequestHistory({required this.id, this.status, this.createdAt});
|
||||
|
||||
UserRequestHistory copyWith({int? id, int? status, int? createdAt}) {
|
||||
return UserRequestHistory(
|
||||
id: id ?? this.id,
|
||||
status: status ?? this.status,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
);
|
||||
}
|
||||
}
|
||||
64
apps/im_app/lib/domain/entities/workspace.dart
Normal file
64
apps/im_app/lib/domain/entities/workspace.dart
Normal file
@@ -0,0 +1,64 @@
|
||||
/// 工作空间 Domain 实体
|
||||
class Workspace {
|
||||
final int id;
|
||||
final String? name;
|
||||
final int? ownerId;
|
||||
final String? description;
|
||||
final String? logo;
|
||||
final int? grade;
|
||||
final int? cap;
|
||||
final String? currency;
|
||||
final int? status;
|
||||
final int? createdAt;
|
||||
final int? updatedAt;
|
||||
final int? deletedAt;
|
||||
final int? channelGroupId;
|
||||
|
||||
const Workspace({
|
||||
required this.id,
|
||||
this.name,
|
||||
this.ownerId,
|
||||
this.description,
|
||||
this.logo,
|
||||
this.grade,
|
||||
this.cap,
|
||||
this.currency,
|
||||
this.status,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.deletedAt,
|
||||
this.channelGroupId,
|
||||
});
|
||||
|
||||
Workspace copyWith({
|
||||
int? id,
|
||||
String? name,
|
||||
int? ownerId,
|
||||
String? description,
|
||||
String? logo,
|
||||
int? grade,
|
||||
int? cap,
|
||||
String? currency,
|
||||
int? status,
|
||||
int? createdAt,
|
||||
int? updatedAt,
|
||||
int? deletedAt,
|
||||
int? channelGroupId,
|
||||
}) {
|
||||
return Workspace(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
ownerId: ownerId ?? this.ownerId,
|
||||
description: description ?? this.description,
|
||||
logo: logo ?? this.logo,
|
||||
grade: grade ?? this.grade,
|
||||
cap: cap ?? this.cap,
|
||||
currency: currency ?? this.currency,
|
||||
status: status ?? this.status,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
channelGroupId: channelGroupId ?? this.channelGroupId,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user