fromEntity static method

Future<BackendRequestModel?> fromEntity(
  1. String documentID,
  2. BackendRequestEntity? entity
)

Implementation

static Future<BackendRequestModel?> fromEntity(
    String documentID, BackendRequestEntity? entity) async {
  if (entity == null) return null;
  return BackendRequestModel(
    documentID: documentID,
    description: entity.description,
    appId: entity.appId ?? '',
    authorId: entity.authorId,
    name: entity.name,
    sendTo: entity.sendTo,
    collections: entity.collections,
    processed: entity.processed,
    requestType: toRequestType(entity.requestType),
  );
}