-
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 #25 from YogitTeam/feat/user-login
#24 feat: 유저 회원가입 API 기능 구현 및 그로 인한 관련 API 수정
- Loading branch information
Showing
23 changed files
with
279 additions
and
297 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: 0 additions & 7 deletions
7
server/src/main/java/com/yogit/server/config/SwaggerConfig.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
32 changes: 8 additions & 24 deletions
32
server/src/main/java/com/yogit/server/user/dto/request/CreateUserEssentialProfileReq.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,41 +1,25 @@ | ||
package com.yogit.server.user.dto.request; | ||
|
||
import com.yogit.server.user.entity.*; | ||
import com.yogit.server.user.entity.Gender; | ||
import com.yogit.server.user.entity.Nationality; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class CreateUserEssentialProfileReq { | ||
|
||
Long userId; | ||
|
||
String userName; | ||
int userAge; | ||
Gender gender; | ||
Nationality nationality; | ||
|
||
LanguageName languageName1; | ||
LanguageLevel languageLevel1; | ||
|
||
LanguageName languageName2; | ||
LanguageLevel languageLevel2; | ||
|
||
LanguageName languageName3; | ||
LanguageLevel languageLevel3; | ||
|
||
LanguageName languageName4; | ||
LanguageLevel languageLevel4; | ||
|
||
LanguageName languageName5; | ||
LanguageLevel languageLevel5; | ||
|
||
public static User toEntityUser(CreateUserEssentialProfileReq createUserEssentialProfileReq){ | ||
return User.builder() | ||
.name(createUserEssentialProfileReq.getUserName()) | ||
.age(createUserEssentialProfileReq.getUserAge()) | ||
.gender(createUserEssentialProfileReq.getGender()) | ||
.nationality(createUserEssentialProfileReq.getNationality()) | ||
.build(); | ||
} | ||
List<String> languageNames; | ||
List<String> languageLevels; | ||
} |
20 changes: 20 additions & 0 deletions
20
server/src/main/java/com/yogit/server/user/dto/request/CreateUserReq.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 com.yogit.server.user.dto.request; | ||
|
||
import com.yogit.server.user.entity.User; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class CreateUserReq { | ||
|
||
String loginId; | ||
|
||
public static User toEntityUser(CreateUserReq createUserReq){ | ||
return User.builder() | ||
.loginId(createUserReq.getLoginId()) | ||
.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
44 changes: 44 additions & 0 deletions
44
server/src/main/java/com/yogit/server/user/dto/response/UserEssentialProfileRes.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,44 @@ | ||
package com.yogit.server.user.dto.response; | ||
|
||
import com.yogit.server.user.dto.request.CreateUserEssentialProfileReq; | ||
import com.yogit.server.user.entity.Gender; | ||
import com.yogit.server.user.entity.Nationality; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class UserEssentialProfileRes { | ||
|
||
Long userId; | ||
|
||
String userName; | ||
Integer userAge; | ||
Gender gender; | ||
Nationality nationality; | ||
|
||
List<String> languageNames = new ArrayList<>(); | ||
List<String> languageLevels = new ArrayList<>(); | ||
|
||
public static UserEssentialProfileRes create(CreateUserEssentialProfileReq createUserEssentialProfileReq){ | ||
UserEssentialProfileRes userEssentialProfileRes = new UserEssentialProfileRes(); | ||
|
||
userEssentialProfileRes.userId = createUserEssentialProfileReq.getUserId(); | ||
userEssentialProfileRes.userName = createUserEssentialProfileReq.getUserName(); | ||
userEssentialProfileRes.userAge = createUserEssentialProfileReq.getUserAge(); | ||
userEssentialProfileRes.gender = createUserEssentialProfileReq.getGender(); | ||
userEssentialProfileRes.nationality = createUserEssentialProfileReq.getNationality(); | ||
|
||
return userEssentialProfileRes; | ||
} | ||
|
||
public void addLanguage(String languageName, String languageLevel){ | ||
this.languageNames.add(languageName); | ||
this.languageLevels.add(languageLevel); | ||
} | ||
} |
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
Oops, something went wrong.