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:
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user