Interface CommentMapper
public interface CommentMapper
Maps between comment entities and DTOs using MapStruct.
-
Method Summary
Modifier and TypeMethodDescriptiontoCommentDTO(CommentEntity commentEntity, Long postId, Long authorId) Converts a comment entity to a comment DTO.
-
Method Details
-
toCommentDTO
Converts a comment entity to a comment DTO.- Parameters:
commentEntity- the comment entity to convertpostId- the ID of the post the comment belongs toauthorId- the ID of the comment author- Returns:
- comment DTO with all fields populated
-