Files
customer-im-client-dev/apps/im_app/lib/domain/entities/call_log.dart
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

68 lines
1.6 KiB
Dart

/// 通话记录 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,
);
}
}