fromEntityPlus static method
Future<PostLikeModel?>
fromEntityPlus(
- String documentID,
- PostLikeEntity? entity, {
- String? appId,
Implementation
static Future<PostLikeModel?> fromEntityPlus(
String documentID, PostLikeEntity? entity,
{String? appId}) async {
if (entity == null) return null;
return PostLikeModel(
documentID: documentID,
postId: entity.postId ?? '',
postCommentId: entity.postCommentId,
memberId: entity.memberId ?? '',
timestamp: entity.timestamp == null
? null
: DateTime.fromMillisecondsSinceEpoch((entity.timestamp as int)),
appId: entity.appId ?? '',
likeType: toLikeType(entity.likeType),
);
}