-
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.
Merge pull request #33 from team-acode/feat/fragrance
chore: 구매 링크 api 수정
- Loading branch information
Showing
5 changed files
with
126 additions
and
20 deletions.
There are no files selected for viewing
27 changes: 9 additions & 18 deletions
27
src/main/java/server/acode/domain/fragrance/dto/response/GetFragrancePurchase.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,26 +1,17 @@ | ||
package server.acode.domain.fragrance.dto.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.*; | ||
import server.acode.domain.fragrance.entity.Fragrance; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
@Builder | ||
public class GetFragrancePurchase { | ||
private String link1; // 구매 링크 url | ||
private String link2; | ||
private String link3; | ||
|
||
public GetFragrancePurchase(String link1, String link2, String link3) { | ||
this.link1 = link1; | ||
this.link2 = link2; | ||
this.link3 = link3; | ||
} | ||
|
||
public static GetFragrancePurchase from(Fragrance fragrance) { | ||
return new GetFragrancePurchase( | ||
fragrance.getLink1(), fragrance.getLink2(), fragrance.getLink3() | ||
); | ||
} | ||
private boolean isSoldOut; | ||
private String fragranceName; | ||
private String brandName; | ||
private List<PurchaseInfo> purchaseList; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/server/acode/domain/fragrance/dto/response/PurchaseInfo.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,14 @@ | ||
package server.acode.domain.fragrance.dto.response; | ||
|
||
import lombok.*; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class PurchaseInfo { | ||
private String title; | ||
private String link; | ||
private String image; | ||
} |
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