fromEntity static method
Implementation
static Future<RoomModel?> fromEntity(
String documentID, RoomEntity? entity) async {
if (entity == null) return null;
return RoomModel(
documentID: documentID,
ownerId: entity.ownerId ?? '',
appId: entity.appId ?? '',
description: entity.description,
isRoom: entity.isRoom,
members: entity.members,
timestamp: entity.timestamp == null
? null
: DateTime.fromMillisecondsSinceEpoch((entity.timestamp as int)),
);
}