-
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 #11 from Domitory-CheckMate/feature/10-member
[feat] 로그인 및 회원가입 기능
- Loading branch information
Showing
15 changed files
with
240 additions
and
13 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
7 changes: 7 additions & 0 deletions
7
src/main/java/org/gachon/checkmate/domain/member/dto/request/MemberSignInRequestDto.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,7 @@ | ||
package org.gachon.checkmate.domain.member.dto.request; | ||
|
||
public record MemberSignInRequestDto( | ||
String email, | ||
String password | ||
) { | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/org/gachon/checkmate/domain/member/dto/request/MemberSignUpRequestDto.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,15 @@ | ||
package org.gachon.checkmate.domain.member.dto.request; | ||
|
||
import org.gachon.checkmate.domain.member.entity.GenderType; | ||
import org.gachon.checkmate.domain.member.entity.MbtiType; | ||
|
||
public record MemberSignUpRequestDto( | ||
String email, | ||
String password, | ||
String name, | ||
String school, | ||
String major, | ||
MbtiType mbtiType, | ||
GenderType genderType | ||
) { | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/org/gachon/checkmate/domain/member/dto/request/PasswordResetRequestDto.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,7 @@ | ||
package org.gachon.checkmate.domain.member.dto.request; | ||
|
||
public record PasswordResetRequestDto( | ||
String email, | ||
String newPassword | ||
) { | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/org/gachon/checkmate/domain/member/dto/response/MemberSignInResponseDto.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,20 @@ | ||
package org.gachon.checkmate.domain.member.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record MemberSignInResponseDto( | ||
Long memberId, | ||
String accessToken, | ||
String refreshToken | ||
) { | ||
public static MemberSignInResponseDto of(Long memberId, | ||
String accessToken, | ||
String refreshToken) { | ||
return MemberSignInResponseDto.builder() | ||
.memberId(memberId) | ||
.accessToken(accessToken) | ||
.refreshToken(refreshToken) | ||
.build(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/org/gachon/checkmate/domain/member/dto/response/MemberSignUpResponseDto.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,23 @@ | ||
package org.gachon.checkmate.domain.member.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record MemberSignUpResponseDto( | ||
Long memberId, | ||
String name, | ||
String accessToken, | ||
String refreshToken | ||
) { | ||
public static MemberSignUpResponseDto of(Long memberId, | ||
String name, | ||
String accessToken, | ||
String refreshToken) { | ||
return MemberSignUpResponseDto.builder() | ||
.memberId(memberId) | ||
.name(name) | ||
.accessToken(accessToken) | ||
.refreshToken(refreshToken) | ||
.build(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/gachon/checkmate/domain/member/entity/ProfileImageType.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.gachon.checkmate.domain.member.entity; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Getter | ||
public enum ProfileImageType { | ||
|
||
PROFILE_1("https://checkmate-dormitory-bucket.s3.ap-northeast-2.amazonaws.com/checkmate-profile1.png"), | ||
PROFILE_2("https://example.com/profile2.jpg"), | ||
PROFILE_3("https://example.com/profile3.jpg"); | ||
|
||
private final String imageUrl; | ||
} |
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
12 changes: 12 additions & 0 deletions
12
src/main/java/org/gachon/checkmate/domain/member/repository/UserRepository.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 org.gachon.checkmate.domain.member.repository; | ||
|
||
import org.gachon.checkmate.domain.member.entity.User; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.Optional; | ||
|
||
public interface UserRepository extends JpaRepository<User, Long> { | ||
|
||
Optional<User> findByEmail(String email); | ||
boolean existsByEmail(String email); | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...n/member/converter/RoomTypeConverter.java → ...ain/post/converter/RoomTypeConverter.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
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
2 changes: 1 addition & 1 deletion
2
...ckmate/domain/member/entity/RoomType.java → ...heckmate/domain/post/entity/RoomType.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
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