Files
Cody c310ded32a 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

修复逻辑漏洞,性能优化
2026-03-08 20:47:28 +08:00

125 lines
3.0 KiB
Dart

/// 群组 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,
);
}
}