-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a8c4f2
commit b1c9432
Showing
1 changed file
with
7 additions
and
21 deletions.
There are no files selected for viewing
28 changes: 7 additions & 21 deletions
28
src/main/java/com/jeju/nanaland/domain/experience/dto/ExperienceSearchDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |