diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/news/dto/response/ReadNewsResponse.java b/backend/core/src/main/java/com/rollthedice/backend/domain/news/dto/response/ReadNewsResponse.java new file mode 100644 index 00000000..215ceedc --- /dev/null +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/news/dto/response/ReadNewsResponse.java @@ -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; +} diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/news/mapper/NewsMapper.java b/backend/core/src/main/java/com/rollthedice/backend/domain/news/mapper/NewsMapper.java index f2b10ba6..d50c6ce7 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/news/mapper/NewsMapper.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/news/mapper/NewsMapper.java @@ -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; @@ -11,5 +12,7 @@ public interface NewsMapper { NewsResponse toResponse(final News news, boolean isBookmarked); + ReadNewsResponse toReadNewsResponse(final News news); + NewsDetailResponse toDetailResponse(final News news); }