-
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.
- Loading branch information
Showing
12 changed files
with
187 additions
and
19 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
27 changes: 21 additions & 6 deletions
27
server/src/main/java/com/yogit/server/user/dto/request/AddUserAdditionalProfileReq.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,8 +1,23 @@ | ||
package com.yogit.server.user.dto.request; | ||
|
||
//@NoArgsConstructor | ||
//@AllArgsConstructor | ||
//@Data | ||
//public class AddUserAdditionalProfileReq { | ||
// | ||
//} | ||
import com.yogit.server.user.entity.CityName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class AddUserAdditionalProfileReq { | ||
|
||
Long userId; | ||
|
||
float latitude; | ||
float longitude; | ||
String aboutMe; | ||
|
||
CityName city; | ||
List<String> interests; | ||
} |
36 changes: 36 additions & 0 deletions
36
server/src/main/java/com/yogit/server/user/dto/response/UserAdditionalProfileRes.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,36 @@ | ||
package com.yogit.server.user.dto.response; | ||
|
||
import com.yogit.server.user.entity.CityName; | ||
import com.yogit.server.user.entity.User; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
public class UserAdditionalProfileRes { | ||
Long userId; | ||
|
||
float latitude; | ||
float longitude; | ||
String aboutMe; | ||
|
||
CityName city; | ||
List<String> interests = new ArrayList<>(); | ||
|
||
public static UserAdditionalProfileRes create(User user){ | ||
UserAdditionalProfileRes userAdditionalProfileRes = new UserAdditionalProfileRes(); | ||
|
||
userAdditionalProfileRes.userId = user.getId(); | ||
userAdditionalProfileRes.latitude = user.getLatitude(); | ||
userAdditionalProfileRes.longitude = user.getLongtitude(); | ||
userAdditionalProfileRes.aboutMe = user.getAboutMe(); | ||
|
||
return userAdditionalProfileRes; | ||
} | ||
|
||
} |
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
server/src/main/java/com/yogit/server/user/entity/CityName.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 com.yogit.server.user.entity; | ||
|
||
public enum CityName { | ||
SEOUL, | ||
BUSAN, | ||
JEJU | ||
} |
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
7 changes: 7 additions & 0 deletions
7
server/src/main/java/com/yogit/server/user/repository/InterestRepository.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 com.yogit.server.user.repository; | ||
|
||
import com.yogit.server.user.entity.Interest; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface InterestRepository extends JpaRepository<Interest, Long> { | ||
} |
7 changes: 7 additions & 0 deletions
7
server/src/main/java/com/yogit/server/user/repository/UserInterestRepository.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 com.yogit.server.user.repository; | ||
|
||
import com.yogit.server.user.entity.UserInterest; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface UserInterestRepository extends JpaRepository<UserInterest, Long> { | ||
} |
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