-
Notifications
You must be signed in to change notification settings - Fork 2
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 #169 from IT-Cotato/feature/168-implement-profile-…
…info-api-및-exit-room-api Feature: implement profile info api 및 exit room api(#168)
- Loading branch information
Showing
10 changed files
with
268 additions
and
21 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
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
43 changes: 43 additions & 0 deletions
43
...n/java/middle_point_search/backend/domains/member/dto/request/FindMemberInfoResponse.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,43 @@ | ||
package middle_point_search.backend.domains.member.dto.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import middle_point_search.backend.domains.member.domain.Member; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public record FindMemberInfoResponse( | ||
String email, | ||
String name, | ||
String existAddress, | ||
String siDo, | ||
String siGunGu, | ||
String roadNameAddress, | ||
Double addressLatitude, | ||
Double addressLongitude | ||
) { | ||
public static FindMemberInfoResponse from(Member member) { | ||
if (member.getExistAddress()) { | ||
return new FindMemberInfoResponse( | ||
member.getEmail(), | ||
member.getName(), | ||
"true", | ||
member.getSiDo(), | ||
member.getSiGunGu(), | ||
member.getRoadNameAddress(), | ||
member.getAddressLatitude(), | ||
member.getAddressLongitude() | ||
); | ||
} else { | ||
return new FindMemberInfoResponse( | ||
member.getEmail(), | ||
member.getName(), | ||
"false", | ||
null, | ||
null, | ||
null, | ||
null, | ||
null | ||
); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...va/middle_point_search/backend/domains/member/dto/request/UpdateMemberAddressRequest.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,12 @@ | ||
package middle_point_search.backend.domains.member.dto.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
|
||
public record UpdateMemberAddressRequest( | ||
@NotBlank(message = "siDo는 비어있을 수 없습니다.") String siDo, | ||
@NotBlank(message = "siGunGu는 비어있을 수 없습니다.") String siGunGu, | ||
@NotBlank(message = "roadNameAddress는 비어있을 수 없습니다.") String roadNameAddress, | ||
Double addressLatitude, | ||
Double addressLongitude | ||
) { | ||
} |
11 changes: 0 additions & 11 deletions
11
.../java/middle_point_search/backend/domains/member/dto/request/UpdateMemberInfoRequest.java
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
.../java/middle_point_search/backend/domains/member/dto/request/UpdateMemberNameRequest.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,9 @@ | ||
package middle_point_search.backend.domains.member.dto.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Size; | ||
|
||
public record UpdateMemberNameRequest( | ||
@NotBlank(message = "이름을 입력해주세요.") @Size(min = 2, max = 30, message = "이름은 2자 이상, 30자 이하여야 합니다.") String name | ||
) { | ||
} |
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
Oops, something went wrong.