fromEntity static method
Implementation
static Future<PostLikeModel?> fromEntity(
String documentID, PostLikeEntity? entity) 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),
);
}