toEntity method

  1. @override
PostCommentEntity toEntity({
  1. String? appId,
})
override

Implementation

@override
PostCommentEntity toEntity({String? appId}) {
  return PostCommentEntity(
    postId: (postId != null) ? postId : null,
    postCommentId: (postCommentId != null) ? postCommentId : null,
    memberId: (memberId != null) ? memberId : null,
    timestamp: (timestamp == null) ? null : timestamp!.millisecondsSinceEpoch,
    appId: appId,
    comment: (comment != null) ? comment : null,
    likes: (likes != null) ? likes : null,
    dislikes: (dislikes != null) ? dislikes : null,
    memberMedia: (memberMedia != null)
        ? memberMedia!.map((item) => item.toEntity(appId: appId)).toList()
        : null,
  );
}