fromEntity static method
Implementation
static Future<MemberMediumModel?> fromEntity(
String documentID, MemberMediumEntity? entity) async {
if (entity == null) return null;
return MemberMediumModel(
documentID: documentID,
appId: entity.appId ?? '',
authorId: entity.authorId,
base: entity.base,
ext: entity.ext,
url: entity.url,
ref: entity.ref,
urlThumbnail: entity.urlThumbnail,
refThumbnail: entity.refThumbnail,
accessibleByGroup:
toMemberMediumAccessibleByGroup(entity.accessibleByGroup),
accessibleByMembers: entity.accessibleByMembers,
readAccess: entity.readAccess,
mediumType: toMediumType(entity.mediumType),
mediumWidth: entity.mediumWidth,
mediumHeight: entity.mediumHeight,
thumbnailWidth: entity.thumbnailWidth,
thumbnailHeight: entity.thumbnailHeight,
relatedMediumId: entity.relatedMediumId,
);
}