diff --git a/src/main/java/com/jeju/nanaland/domain/experience/dto/ExperienceSearchDto.java b/src/main/java/com/jeju/nanaland/domain/experience/dto/ExperienceSearchDto.java index 0e12e3a5..a3ce2511 100644 --- a/src/main/java/com/jeju/nanaland/domain/experience/dto/ExperienceSearchDto.java +++ b/src/main/java/com/jeju/nanaland/domain/experience/dto/ExperienceSearchDto.java @@ -1,36 +1,22 @@ package com.jeju.nanaland.domain.experience.dto; -import com.jeju.nanaland.domain.common.dto.ImageFileDto; +import com.jeju.nanaland.domain.common.dto.SearchDto; import com.querydsl.core.annotations.QueryProjection; import java.time.LocalDateTime; import lombok.AccessLevel; -import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; @Data -@Builder +@SuperBuilder @NoArgsConstructor(access = AccessLevel.PROTECTED) -@AllArgsConstructor -public class ExperienceSearchDto { - - private Long id; - private String title; - private ImageFileDto firstImage; - private Long matchedCount; - private LocalDateTime createdAt; +public class ExperienceSearchDto extends SearchDto { @QueryProjection public ExperienceSearchDto(Long id, String title, String originUrl, String thumbnailUrl, - Long matchedCount, LocalDateTime createdAt) { - this.id = id; - this.title = title; - this.firstImage = new ImageFileDto(originUrl, thumbnailUrl); - this.matchedCount = matchedCount; - } - - public void addMatchedCount(Long count) { - this.matchedCount += count; + Long matchedCount, + LocalDateTime createdAt) { + super(id, title, originUrl, thumbnailUrl, matchedCount, createdAt); } }