toEntity method
Implementation
@override
PostEntity toEntity({String? appId}) {
return PostEntity(
authorId: authorId,
timestamp: (timestamp == null) ? null : timestamp!.millisecondsSinceEpoch,
appId: appId,
feedId: (feedId != null) ? feedId : null,
postAppId: (postAppId != null) ? postAppId : null,
postPageId: (postPageId != null) ? postPageId : null,
pageParameters: pageParameters,
html: (html != null) ? html : null,
description: (description != null) ? description : null,
likes: (likes != null) ? likes : null,
dislikes: (dislikes != null) ? dislikes : null,
accessibleByGroup:
(accessibleByGroup != null) ? accessibleByGroup!.index : null,
accessibleByMembers:
(accessibleByMembers != null) ? accessibleByMembers : null,
readAccess: (readAccess != null) ? readAccess : null,
archived: (archived != null) ? archived!.index : null,
externalLink: (externalLink != null) ? externalLink : null,
memberMedia: (memberMedia != null)
? memberMedia!.map((item) => item.toEntity(appId: appId)).toList()
: null,
);
}