-
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
1 parent
e318df4
commit 6a8a8ff
Showing
8 changed files
with
125 additions
and
4 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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/odiga/fiesta/user/dto/response/UserOnboardingResponse.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,25 @@ | ||
package com.odiga.fiesta.user.dto.response; | ||
|
||
import java.util.List; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@Getter | ||
public class UserOnboardingResponse { | ||
private List<Long> categoryIds; | ||
private List<Long> moodIds; | ||
private List<Long> companionIds; | ||
private List<Long> priorityIds; | ||
|
||
@Builder | ||
private UserOnboardingResponse(List<Long> categoryIds, List<Long> moodIds, List<Long> companionIds, | ||
List<Long> priorityIds) { | ||
this.categoryIds = categoryIds; | ||
this.moodIds = moodIds; | ||
this.companionIds = companionIds; | ||
this.priorityIds = priorityIds; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/odiga/fiesta/user/repository/UserCategoryRepository.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,16 @@ | ||
package com.odiga.fiesta.user.repository; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import com.odiga.fiesta.user.domain.mapping.UserCategory; | ||
|
||
public interface UserCategoryRepository extends JpaRepository<UserCategory, Long> { | ||
|
||
@Query("SELECT uc.categoryId FROM UserCategory uc WHERE uc.userId = :userId") | ||
List<Long> findCategoryIdsByUserId(@Param("userId") Long userId); | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/com/odiga/fiesta/user/repository/UserCompanionRepository.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,15 @@ | ||
package com.odiga.fiesta.user.repository; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import com.odiga.fiesta.user.domain.mapping.UserCompanion; | ||
|
||
public interface UserCompanionRepository extends JpaRepository<UserCompanion, Long> { | ||
|
||
@Query("SELECT uc.companionId FROM UserCompanion uc WHERE uc.userId = :userId") | ||
List<Long> findCompanionIdsByUserId(@Param("userId") Long userId); | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/odiga/fiesta/user/repository/UserMoodRepository.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,16 @@ | ||
package com.odiga.fiesta.user.repository; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import com.odiga.fiesta.user.domain.mapping.UserMood; | ||
|
||
public interface UserMoodRepository extends JpaRepository<UserMood, Long> { | ||
|
||
|
||
@Query("SELECT um.moodId FROM UserMood um WHERE um.userId = :userId") | ||
List<Long> findMoodIdsByUserId(@Param("userId") Long userId); | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/odiga/fiesta/user/repository/UserPriorityRepository.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,16 @@ | ||
package com.odiga.fiesta.user.repository; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
import com.odiga.fiesta.user.domain.mapping.UserPriority; | ||
|
||
import io.lettuce.core.dynamic.annotation.Param; | ||
|
||
public interface UserPriorityRepository extends JpaRepository<UserPriority, Long> { | ||
|
||
@Query("SELECT up.priorityId FROM UserPriority up WHERE up.userId = :userId") | ||
List<Long> findPriorityIdsByUserId(@Param("userId") Long userId); | ||
} |
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