-
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.
- Loading branch information
Showing
6 changed files
with
56 additions
and
0 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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/nice/petudio/api/controller/gift/dto/GiftRetrieveResponse.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,10 @@ | ||
package com.nice.petudio.api.controller.gift.dto; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public record GiftRetrieveResponse(String giftCode, LocalDateTime expiredAt) { | ||
|
||
public static GiftRetrieveResponse of(String giftCode, LocalDateTime expiredAt) { | ||
return new GiftRetrieveResponse(giftCode, expiredAt); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/nice/petudio/api/controller/gift/dto/GiftsRetrieveResponse.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,6 @@ | ||
package com.nice.petudio.api.controller.gift.dto; | ||
|
||
import java.util.List; | ||
|
||
public record GiftsRetrieveResponse(List<GiftRetrieveResponse> giftsInfo){ | ||
} |
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
2 changes: 2 additions & 0 deletions
2
src/main/java/com/nice/petudio/domain/gift/repository/GiftRepositoryCustom.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,8 +1,10 @@ | ||
package com.nice.petudio.domain.gift.repository; | ||
|
||
import com.nice.petudio.domain.gift.Gift; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface GiftRepositoryCustom { | ||
Optional<Gift> findByGiftCode(String giftCode); | ||
List<Gift> findUsableGiftsByBuyerId(Long memberId); | ||
} |
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