fromEntity static method
Implementation
static Future<NotificationModel?> fromEntity(
String documentID, NotificationEntity? entity) async {
if (entity == null) return null;
return NotificationModel(
documentID: documentID,
timestamp: entity.timestamp == null
? null
: DateTime.fromMillisecondsSinceEpoch((entity.timestamp as int)),
appId: entity.appId ?? '',
description: entity.description,
read: entity.read,
reporterId: entity.reporterId,
assigneeId: entity.assigneeId,
status: toNotificationStatus(entity.status),
);
}