-
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
1 parent
f89fef5
commit e401a52
Showing
9 changed files
with
121 additions
and
12 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/com/offer/authentication/application/response/MemberProfileResponse.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,31 @@ | ||
package com.offer.authentication.application.response; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
/** | ||
* 타 사용자 프로필 조회 | ||
* */ | ||
@Getter | ||
public class MemberProfileResponse { | ||
|
||
private Long id; | ||
private String nickname; | ||
private String profileImageUrl; | ||
private long offerLevel; | ||
private long sellingProductCount; | ||
private long soldProductCount; | ||
private long reviewCount; | ||
|
||
@Builder | ||
public MemberProfileResponse(Long id, String nickname, String profileImageUrl, | ||
long offerLevel, long sellingProductCount, long soldProductCount, long reviewCount) { | ||
this.id = id; | ||
this.nickname = nickname; | ||
this.profileImageUrl = profileImageUrl; | ||
this.offerLevel = offerLevel; | ||
this.sellingProductCount = sellingProductCount; | ||
this.soldProductCount = soldProductCount; | ||
this.reviewCount = reviewCount; | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
package com.offer.post.domain; | ||
|
||
import java.util.Arrays; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum TradeStatus { | ||
SELLING, | ||
SOLD | ||
SOLD, | ||
UNKNOWN | ||
; | ||
|
||
public static TradeStatus from(String name) { | ||
if (name == null) { | ||
return UNKNOWN; | ||
} | ||
return Arrays.stream(values()) | ||
.filter(tradeStatus -> tradeStatus.name().equals(name)) | ||
.findFirst() | ||
.orElse(UNKNOWN); | ||
} | ||
} |