-
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 #88 from Favor-Gift-Reminder/eunki/87
[Fix] 유저간 아이디(닉네임) 중복 허용 문제, 고유값 추가
- Loading branch information
Showing
6 changed files
with
29 additions
and
19 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
24 changes: 16 additions & 8 deletions
24
favor/src/main/java/com/favor/favor/friend/FriendSimpleDto.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,22 +1,30 @@ | ||
package com.favor.favor.friend; | ||
|
||
import com.favor.favor.photo.UserPhoto; | ||
import com.favor.favor.user.User; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public class FriendSimpleDto { | ||
private Long friendNo; | ||
private Long friendUserNo; | ||
private String friendName; | ||
private UserPhoto photo; | ||
private UserPhoto userPhoto; | ||
|
||
@Builder | ||
public FriendSimpleDto(Friend friend, User friendUser, UserPhoto photo){ | ||
this.friendNo = friend.getFriendNo(); | ||
this.friendName = friendUser.getName(); | ||
this.photo = photo; | ||
private FriendSimpleDto(Long friendNo, Long friendUserNo, String friendName, UserPhoto userPhoto){ | ||
this.friendNo = friendNo; | ||
this.friendUserNo = friendUserNo; | ||
this.friendName = friendName; | ||
this.userPhoto = userPhoto; | ||
} | ||
|
||
public static FriendSimpleDto from(Friend friend, UserPhoto userPhoto){ | ||
return FriendSimpleDto.builder() | ||
.friendNo(friend.getFriendNo()) | ||
.friendUserNo(friend.getFriendUserNo()) | ||
.friendName(friend.getFriendName()) | ||
.userPhoto(userPhoto) | ||
.build(); | ||
} | ||
} |
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