Skip to content

Commit

Permalink
feat: ReadNewsResponse DTO 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed May 29, 2024
1 parent f6c2507 commit 6429b08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.rollthedice.backend.domain.news.dto.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ReadNewsResponse {
private Long id;
private String title;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.rollthedice.backend.domain.news.dto.response.NewsDetailResponse;
import com.rollthedice.backend.domain.news.dto.response.NewsResponse;
import com.rollthedice.backend.domain.news.dto.response.ReadNewsResponse;
import com.rollthedice.backend.domain.news.entity.News;
import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants.ComponentModel;
Expand All @@ -11,5 +12,7 @@ public interface NewsMapper {

NewsResponse toResponse(final News news, boolean isBookmarked);

ReadNewsResponse toReadNewsResponse(final News news);

NewsDetailResponse toDetailResponse(final News news);
}

0 comments on commit 6429b08

Please sign in to comment.