-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[feat] 선물방 정보 관련 기능 구현
- Loading branch information
Showing
12 changed files
with
328 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
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
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
22 changes: 22 additions & 0 deletions
22
src/main/java/org/sopt/sweet/domain/room/dto/response/HotProductGiftDto.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.sopt.sweet.domain.room.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record HotProductGiftDto( | ||
Long productId, | ||
String imageUrl, | ||
String name, | ||
String url, | ||
int cost | ||
) { | ||
public static HotProductGiftDto of(Long productId, String imageUrl, String name, String url, int cost){ | ||
return HotProductGiftDto.builder() | ||
.productId(productId) | ||
.imageUrl(imageUrl) | ||
.name(name) | ||
.url(url) | ||
.cost(cost) | ||
.build(); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/org/sopt/sweet/domain/room/dto/response/RoomDetailResponseDto.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.sopt.sweet.domain.room.dto.response; | ||
|
||
import lombok.Builder; | ||
import org.sopt.sweet.domain.room.constant.TournamentDuration; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Builder | ||
public record RoomDetailResponseDto( | ||
Long roomId, | ||
String imageUrl, | ||
String gifteeName, | ||
int gifterNumber, | ||
LocalDateTime deliveryDate, | ||
LocalDateTime tournamentStartDate, | ||
TournamentDuration tournamentDuration | ||
) { | ||
public static RoomDetailResponseDto of(Long roomId, | ||
String imageUrl, | ||
String gifteeName, | ||
int gifterNumber, | ||
LocalDateTime deliveryDate, | ||
LocalDateTime tournamentStartDate, | ||
TournamentDuration tournamentDuration){ | ||
return RoomDetailResponseDto.builder() | ||
.roomId(roomId) | ||
.imageUrl(imageUrl) | ||
.gifteeName(gifteeName) | ||
.gifterNumber(gifterNumber) | ||
.deliveryDate(deliveryDate) | ||
.tournamentStartDate(tournamentStartDate) | ||
.tournamentDuration(tournamentDuration) | ||
.build(); | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/org/sopt/sweet/domain/room/dto/response/RoomFriendsGiftDto.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.sopt.sweet.domain.room.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record RoomFriendsGiftDto( | ||
Long giftId, | ||
String imageUrl, | ||
String name, | ||
String url, | ||
int cost, | ||
String ownerName | ||
) { | ||
public static RoomFriendsGiftDto of(Long giftId, String imageUrl, String name, String url, int cost, String ownerName) { | ||
return RoomFriendsGiftDto.builder() | ||
.giftId(giftId) | ||
.imageUrl(imageUrl) | ||
.name(name) | ||
.url(url) | ||
.cost(cost) | ||
.ownerName(ownerName) | ||
.build(); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/org/sopt/sweet/domain/room/dto/response/RoomMainResponseDto.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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.sopt.sweet.domain.room.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
@Builder | ||
public record RoomMainResponseDto( | ||
int gifterNumber, | ||
String gifteeName, | ||
String invitationCode, | ||
LocalDateTime tournamentStartDate, | ||
List<RoomMyGiftDto> roomMyGiftDtoList, | ||
List<RoomFriendsGiftDto> roomFriendsGiftDtoList, | ||
List<HotProductGiftDto> hotProductGiftDtoList | ||
) { | ||
public static RoomMainResponseDto of(int gifterNumber, | ||
String gifteeName, | ||
String invitationCode, | ||
LocalDateTime tournamentStartDate, | ||
List<RoomMyGiftDto> roomMyGiftDtoList, | ||
List<RoomFriendsGiftDto> roomFriendsGiftDtoList, | ||
List<HotProductGiftDto> hotProductGiftDtoList){ | ||
return RoomMainResponseDto.builder() | ||
.gifterNumber(gifterNumber) | ||
.gifteeName(gifteeName) | ||
.invitationCode(invitationCode) | ||
.tournamentStartDate(tournamentStartDate) | ||
.roomMyGiftDtoList(roomMyGiftDtoList) | ||
.roomFriendsGiftDtoList(roomFriendsGiftDtoList) | ||
.hotProductGiftDtoList(hotProductGiftDtoList) | ||
.build(); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/org/sopt/sweet/domain/room/dto/response/RoomMyGiftDto.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.sopt.sweet.domain.room.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record RoomMyGiftDto( | ||
Long giftId, | ||
String imageUrl, | ||
String name, | ||
String url, | ||
int cost | ||
) { | ||
public static RoomMyGiftDto of(Long giftId, String imageUrl, String name, String url, int cost){ | ||
return RoomMyGiftDto.builder() | ||
.giftId(giftId) | ||
.imageUrl(imageUrl) | ||
.name(name) | ||
.url(url) | ||
.cost(cost) | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.