Skip to content

Commit

Permalink
update: Reqeust / Response FavoriteDto 위치 수정
Browse files Browse the repository at this point in the history
Request / Response 패키지를 나누어 관리.
패키지에 따른 임포트 위리 변경 수정
  • Loading branch information
TonyKim9401 committed Oct 9, 2023
1 parent 9ca8e08 commit 3d9b7fa
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hh2.katj.favorite.component

import com.hh2.katj.favorite.model.entity.Favorite
import com.hh2.katj.favorite.model.dto.RequestAddFavorite
import com.hh2.katj.favorite.model.dto.request.RequestAddFavorite
import com.hh2.katj.favorite.repository.FavoriteRepository
import com.hh2.katj.user.model.entity.User
import com.hh2.katj.user.repository.UserRepository
Expand All @@ -14,9 +14,8 @@ import java.lang.IllegalArgumentException

@Component
class FavoriteReader (
private val favoriteRepository: FavoriteRepository,
private val userRepository: UserRepository,

private val favoriteRepository: FavoriteRepository,
private val userRepository: UserRepository,
) {

@Transactional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.hh2.katj.favorite.controller

import com.hh2.katj.favorite.model.dto.RequestAddFavorite
import com.hh2.katj.favorite.model.dto.RequestUpdateFavorite
import com.hh2.katj.favorite.model.dto.ResponseFavorite
import com.hh2.katj.favorite.model.dto.request.RequestAddFavorite
import com.hh2.katj.favorite.model.dto.request.RequestUpdateFavorite
import com.hh2.katj.favorite.model.dto.response.ResponseFavorite
import com.hh2.katj.favorite.service.FavoriteService
import com.hh2.katj.user.service.UserService
import jakarta.validation.Valid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hh2.katj.favorite.model.dto
package com.hh2.katj.favorite.model.dto.request

import com.hh2.katj.favorite.model.entity.Favorite
import com.hh2.katj.user.model.entity.User
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hh2.katj.favorite.model.dto
package com.hh2.katj.favorite.model.dto.request

import com.hh2.katj.favorite.model.entity.Favorite
import com.hh2.katj.user.model.entity.User
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hh2.katj.favorite.model.dto
package com.hh2.katj.favorite.model.dto.response

import com.hh2.katj.user.model.entity.User
import com.hh2.katj.util.model.RoadAddress
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.hh2.katj.favorite.model.entity

import com.hh2.katj.favorite.model.dto.ResponseFavorite
import com.hh2.katj.favorite.model.dto.response.ResponseFavorite
import com.hh2.katj.user.model.entity.User
import com.hh2.katj.util.model.BaseEntity
import com.hh2.katj.util.model.RoadAddress
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hh2.katj.favorite.service

import com.hh2.katj.favorite.component.FavoriteManager
import com.hh2.katj.favorite.model.dto.ResponseFavorite
import com.hh2.katj.favorite.model.dto.response.ResponseFavorite
import com.hh2.katj.favorite.model.entity.Favorite
import com.hh2.katj.user.component.UserManager
import com.hh2.katj.user.service.UserService
Expand All @@ -13,9 +13,9 @@ import org.springframework.stereotype.Service
*/
@Service
class FavoriteService (
private val favoriteManager: FavoriteManager,
private val userService: UserService,
private val userManager: UserManager,
private val favoriteManager: FavoriteManager,
private val userService: UserService,
private val userManager: UserManager,
){
fun addFavorite(request: Favorite): ResponseFavorite {
val validatedUser = userService.userValidationCheck(request.user.id)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.hh2.katj.favorite.service

import com.hh2.katj.favorite.model.dto.RequestAddFavorite
import com.hh2.katj.favorite.model.dto.RequestUpdateFavorite
import com.hh2.katj.favorite.model.dto.ResponseFavorite
import com.hh2.katj.favorite.model.dto.request.RequestAddFavorite
import com.hh2.katj.favorite.model.dto.request.RequestUpdateFavorite
import com.hh2.katj.favorite.model.dto.response.ResponseFavorite
import com.hh2.katj.favorite.model.entity.Favorite
import com.hh2.katj.favorite.repository.FavoriteRepository
import com.hh2.katj.user.model.entity.Gender
Expand Down

0 comments on commit 3d9b7fa

Please sign in to comment.