fromEntity static method
Implementation
static Future<AccessModel?> fromEntity(
String documentID, AccessEntity? entity) async {
if (entity == null) return null;
return AccessModel(
documentID: documentID,
appId: entity.appId ?? '',
privilegeLevel: toPrivilegeLevel(entity.privilegeLevel),
points: entity.points,
blocked: entity.blocked,
privilegeLevelBeforeBlocked:
toPrivilegeLevelBeforeBlocked(entity.privilegeLevelBeforeBlocked),
);
}