-
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.
- Loading branch information
Showing
23 changed files
with
174 additions
and
62 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/main/java/org/ioteatime/meonghanyangserver/auth/dto/db/LoginWithMemberInfo.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 org.ioteatime.meonghanyangserver.auth.dto.db; | ||
|
||
import org.ioteatime.meonghanyangserver.groupmember.doamin.enums.GroupMemberRole; | ||
|
||
public record LoginWithMemberInfo( | ||
Long memberId, | ||
String nickname, | ||
String password, | ||
boolean isGroupMember, | ||
GroupMemberRole role) {} |
17 changes: 15 additions & 2 deletions
17
src/main/java/org/ioteatime/meonghanyangserver/auth/dto/reponse/LoginResponse.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,21 +1,34 @@ | ||
package org.ioteatime.meonghanyangserver.auth.dto.reponse; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import org.ioteatime.meonghanyangserver.groupmember.doamin.enums.GroupMemberRole; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public record LoginResponse( | ||
@NotNull @Schema(description = "회원 ID", example = "1") Long memberId, | ||
@NotBlank @Schema(description = "회원 AccessToken", example = "Bearer abcd...") | ||
String accessToken, | ||
@NotBlank @Schema(description = "회원 RefreshToken", example = "Bearer abcd...") | ||
String refreshToken) { | ||
String refreshToken, | ||
@NotNull @Schema(description = "회원이 가입한 그룹이 있는지 여부", example = "true") | ||
Boolean isGroupMember, | ||
@Schema(description = "회원의 그룹 역할", example = "MASTER") GroupMemberRole role) { | ||
|
||
@Builder | ||
public LoginResponse(Long memberId, String accessToken, String refreshToken) { | ||
public LoginResponse( | ||
Long memberId, | ||
String accessToken, | ||
String refreshToken, | ||
Boolean isGroupMember, | ||
GroupMemberRole role) { | ||
this.memberId = memberId; | ||
this.accessToken = accessToken; | ||
this.refreshToken = refreshToken; | ||
this.isGroupMember = isGroupMember; | ||
this.role = role; | ||
} | ||
} |
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
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
14 changes: 14 additions & 0 deletions
14
src/main/java/org/ioteatime/meonghanyangserver/member/dto/response/GroupDetailResponse.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 org.ioteatime.meonghanyangserver.member.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import org.ioteatime.meonghanyangserver.group.domain.GroupEntity; | ||
|
||
@Schema(description = "그룹의 상세 정보 조회") | ||
public record GroupDetailResponse( | ||
@NotNull @Schema(description = "그룹 ID", example = "1") Long id, | ||
@NotNull @Schema(description = "그룹 이름", example = "멍하냥 그룹") String groupName) { | ||
public static GroupDetailResponse from(GroupEntity group) { | ||
return new GroupDetailResponse(group.getId(), group.getGroupName()); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...a/org/ioteatime/meonghanyangserver/member/dto/response/MemberWithGroupDetailResponse.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,16 @@ | ||
package org.ioteatime.meonghanyangserver.member.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
|
||
@Schema(description = "회원 및 그룹 정보 조회") | ||
public record MemberWithGroupDetailResponse( | ||
@NotNull @Schema(description = "회원 정보") MemberDetailResponse member, | ||
@Schema(description = "그룹 정보") GroupDetailResponse group) { | ||
@Builder | ||
public MemberWithGroupDetailResponse(MemberDetailResponse member, GroupDetailResponse group) { | ||
this.member = member; | ||
this.group = group; | ||
} | ||
} |
Oops, something went wrong.