-
Notifications
You must be signed in to change notification settings - Fork 1
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 #124 from Media-XI/ARTDEV-139-be-팔로우-팔로잉-목록-확인
feat: Artdev 139 be 팔로우 팔로잉 목록 확인
- Loading branch information
Showing
10 changed files
with
326 additions
and
14 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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/example/codebase/domain/follow/dto/FollowMemberDetailResponseDTO.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,33 @@ | ||
package com.example.codebase.domain.follow.dto; | ||
|
||
import com.example.codebase.domain.member.entity.Member; | ||
import com.example.codebase.domain.member.entity.RoleStatus; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@Builder | ||
public class FollowMemberDetailResponseDTO { | ||
|
||
private String userId; | ||
private String username; | ||
private String profileImage; | ||
private String introduction; | ||
private RoleStatus roleStatus; | ||
private String status; | ||
|
||
public static FollowMemberDetailResponseDTO of(Member member, String status){ | ||
return FollowMemberDetailResponseDTO.builder() | ||
.userId(member.getId().toString()) | ||
.username(member.getUsername()) | ||
.profileImage(member.getPicture()) | ||
.introduction(member.getIntroduction()) | ||
.roleStatus(member.getRoleStatus()) | ||
.status(status) | ||
.build(); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/example/codebase/domain/follow/dto/FollowMembersResponseDTO.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,25 @@ | ||
package com.example.codebase.domain.follow.dto; | ||
|
||
import com.example.codebase.controller.dto.PageInfo; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class FollowMembersResponseDTO { | ||
|
||
private List<FollowMemberDetailResponseDTO> followingList; | ||
|
||
private PageInfo pageInfo; | ||
|
||
public static FollowMembersResponseDTO of(List<FollowMemberDetailResponseDTO> followMemberDetailResponseDTO, PageInfo pageInfo ) { | ||
return FollowMembersResponseDTO.builder() | ||
.followingList(followMemberDetailResponseDTO) | ||
.pageInfo(pageInfo) | ||
.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
8 changes: 8 additions & 0 deletions
8
src/main/java/com/example/codebase/domain/follow/entity/FollowWithIsFollow.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,8 @@ | ||
package com.example.codebase.domain.follow.entity; | ||
|
||
public interface FollowWithIsFollow { | ||
|
||
Follow getFollow(); | ||
|
||
String getStatus(); | ||
} |
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
3 changes: 3 additions & 0 deletions
3
src/main/resources/db/migration/V202402031753__modifiy_follow_id_name_and_position.sql
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,3 @@ | ||
ALTER TABLE `follow` | ||
CHANGE COLUMN `follower_id` `following_id` BINARY(16) NOT NULL , | ||
CHANGE COLUMN `follow_id` `follower_id` BINARY(16) NOT NULL ; |
Oops, something went wrong.