copyWith method
Creates a copy of this delivery status with updated fields.
Implementation
DeliveryStatusEntity copyWith({
String? notificationId,
DeliveryStatus? status,
DateTime? timestamp,
String? errorMessage,
int? retryCount,
DateTime? deliveredAt,
DateTime? openedAt,
DateTime? dismissedAt,
Map<String, dynamic>? metadata,
}) {
return DeliveryStatusEntity(
notificationId: notificationId ?? this.notificationId,
status: status ?? this.status,
timestamp: timestamp ?? this.timestamp,
errorMessage: errorMessage ?? this.errorMessage,
retryCount: retryCount ?? this.retryCount,
deliveredAt: deliveredAt ?? this.deliveredAt,
openedAt: openedAt ?? this.openedAt,
dismissedAt: dismissedAt ?? this.dismissedAt,
metadata: metadata ?? this.metadata,
);
}