Skip to content

Commit

Permalink
refactor: usecase 패키지 위치 통일 (usercase 아래 )
Browse files Browse the repository at this point in the history
  • Loading branch information
hun-ca committed Jul 9, 2024
1 parent 488f3ec commit 8f59204
Show file tree
Hide file tree
Showing 51 changed files with 78 additions and 79 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.few.api.domain.admin.document.usecase

import com.few.api.domain.admin.document.dto.AddArticleUseCaseIn
import com.few.api.domain.admin.document.dto.AddArticleUseCaseOut
import com.few.api.domain.admin.document.usecase.dto.AddArticleUseCaseIn
import com.few.api.domain.admin.document.usecase.dto.AddArticleUseCaseOut
import com.few.api.domain.admin.document.service.GetUrlService
import com.few.api.domain.admin.document.service.dto.GetUrlQuery
import com.few.api.domain.admin.document.utils.ObjectPathGenerator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.few.api.domain.admin.document.usecase

import com.few.api.domain.admin.document.dto.AddWorkbookUseCaseIn
import com.few.api.domain.admin.document.dto.AddWorkbookUseCaseOut
import com.few.api.domain.admin.document.usecase.dto.AddWorkbookUseCaseIn
import com.few.api.domain.admin.document.usecase.dto.AddWorkbookUseCaseOut
import com.few.api.exception.common.InsertException
import com.few.api.repo.dao.workbook.WorkbookDao
import com.few.api.repo.dao.workbook.command.InsertWorkBookCommand
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.few.api.domain.admin.document.usecase

import com.few.api.domain.admin.document.dto.ConvertContentUseCaseIn
import com.few.api.domain.admin.document.dto.ConvertContentUseCaseOut
import com.few.api.domain.admin.document.usecase.dto.ConvertContentUseCaseIn
import com.few.api.domain.admin.document.usecase.dto.ConvertContentUseCaseOut
import com.few.api.domain.admin.document.service.GetUrlService
import com.few.api.domain.admin.document.service.dto.GetUrlQuery
import com.few.api.domain.admin.document.utils.ObjectPathGenerator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.domain.admin.document.usecase

import com.few.api.domain.admin.document.dto.MapArticleUseCaseIn
import com.few.api.domain.admin.document.usecase.dto.MapArticleUseCaseIn
import com.few.api.repo.dao.workbook.WorkbookDao
import com.few.api.repo.dao.workbook.command.MapWorkBookToArticleCommand
import org.springframework.stereotype.Component
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.few.api.domain.admin.document.usecase

import com.few.api.domain.admin.document.dto.PutImageUseCaseIn
import com.few.api.domain.admin.document.dto.PutImageUseCaseOut
import com.few.api.domain.admin.document.usecase.dto.PutImageUseCaseIn
import com.few.api.domain.admin.document.usecase.dto.PutImageUseCaseOut
import com.few.api.domain.admin.document.service.GetUrlService
import com.few.api.domain.admin.document.service.dto.GetUrlQuery
import com.few.api.domain.admin.document.utils.ObjectPathGenerator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

import java.net.URL

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

data class AddArticleUseCaseOut(
val articleId: Long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

import java.net.URL

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

data class AddWorkbookUseCaseOut(
val workbookId: Long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

import org.springframework.web.multipart.MultipartFile

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

import java.net.URL

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

data class MapArticleUseCaseIn(
val workbookId: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

import org.springframework.web.multipart.MultipartFile

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.admin.document.dto
package com.few.api.domain.admin.document.usecase.dto

import java.net.URL

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.few.api.domain.article.usecase

import com.few.api.domain.article.dto.ReadArticleUseCaseIn
import com.few.api.domain.article.dto.ReadArticleUseCaseOut
import com.few.api.domain.article.dto.WriterDetail
import com.few.api.domain.article.usecase.dto.ReadArticleUseCaseIn
import com.few.api.domain.article.usecase.dto.ReadArticleUseCaseOut
import com.few.api.domain.article.usecase.dto.WriterDetail
import com.few.api.domain.article.service.BrowseArticleProblemsService
import com.few.api.domain.article.service.ReadArticleWriterRecordService
import com.few.api.domain.article.service.dto.BrowseArticleProblemIdsQuery
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.article.dto
package com.few.api.domain.article.usecase.dto

data class ReadArticleUseCaseIn(
val articleId: Long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.article.dto
package com.few.api.domain.article.usecase.dto

import java.net.URL
import java.time.LocalDateTime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.few.api.domain.problem.usecase

import com.few.api.domain.problem.usecase.`in`.BrowseProblemsUseCaseIn
import com.few.api.domain.problem.usecase.out.BrowseProblemsUseCaseOut
import com.few.api.domain.problem.usecase.dto.BrowseProblemsUseCaseIn
import com.few.api.domain.problem.usecase.dto.BrowseProblemsUseCaseOut
import com.few.api.exception.common.NotFoundException
import com.few.api.repo.dao.problem.ProblemDao
import com.few.api.repo.dao.problem.query.SelectProblemsByArticleIdQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import com.few.api.repo.dao.problem.ProblemDao
import com.few.api.repo.dao.problem.SubmitHistoryDao
import com.few.api.repo.dao.problem.command.InsertSubmitHistoryCommand
import com.few.api.repo.dao.problem.query.SelectProblemAnswerQuery
import com.few.api.domain.problem.usecase.`in`.CheckProblemUseCaseIn
import com.few.api.domain.problem.usecase.out.CheckProblemUseCaseOut
import com.few.api.domain.problem.usecase.dto.CheckProblemUseCaseIn
import com.few.api.domain.problem.usecase.dto.CheckProblemUseCaseOut
import com.few.api.exception.common.InsertException
import com.few.api.exception.common.NotFoundException
import org.springframework.stereotype.Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.few.api.domain.problem.usecase

import com.few.api.repo.dao.problem.ProblemDao
import com.few.api.repo.dao.problem.query.SelectProblemQuery
import com.few.api.domain.problem.usecase.`in`.ReadProblemUseCaseIn
import com.few.api.domain.problem.usecase.out.ReadProblemContentsUseCaseOutDetail
import com.few.api.domain.problem.usecase.out.ReadProblemUseCaseOut
import com.few.api.domain.problem.usecase.dto.ReadProblemUseCaseIn
import com.few.api.domain.problem.usecase.dto.ReadProblemContentsUseCaseOutDetail
import com.few.api.domain.problem.usecase.dto.ReadProblemUseCaseOut
import com.few.api.exception.common.NotFoundException
import com.few.api.repo.dao.problem.support.ContentsJsonMapper
import org.springframework.stereotype.Component
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.problem.usecase.`in`
package com.few.api.domain.problem.usecase.dto

data class BrowseProblemsUseCaseIn(
val articleId: Long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.problem.usecase.out
package com.few.api.domain.problem.usecase.dto

data class BrowseProblemsUseCaseOut(
val problemIds: List<Long>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.problem.usecase.`in`
package com.few.api.domain.problem.usecase.dto

data class CheckProblemUseCaseIn(
val problemId: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.problem.usecase.out
package com.few.api.domain.problem.usecase.dto

data class CheckProblemUseCaseOut(
val explanation: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.problem.usecase.`in`
package com.few.api.domain.problem.usecase.dto

data class ReadProblemUseCaseIn(
val problemId: Long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.problem.usecase.out
package com.few.api.domain.problem.usecase.dto

class ReadProblemUseCaseOut(
val id: Long,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.few.api.domain.subscription.service.dto.ReadMemberIdDto
import com.few.api.repo.dao.subscription.SubscriptionDao
import com.few.api.repo.dao.subscription.command.InsertWorkbookSubscriptionCommand
import com.few.api.repo.dao.subscription.query.SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt
import com.few.api.domain.subscription.usecase.`in`.SubscribeWorkbookUseCaseIn
import com.few.api.domain.subscription.usecase.dto.SubscribeWorkbookUseCaseIn
import com.few.api.exception.common.NotFoundException
import com.few.api.exception.subscribe.SubscribeIllegalArgumentException
import com.few.api.repo.dao.subscription.query.CountWorkbookMappedArticlesQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.few.api.domain.subscription.usecase

import com.few.api.domain.subscription.service.MemberService
import com.few.api.domain.subscription.service.dto.ReadMemberIdDto
import com.few.api.domain.subscription.usecase.`in`.UnsubscribeAllUseCaseIn
import com.few.api.domain.subscription.usecase.dto.UnsubscribeAllUseCaseIn
import com.few.api.exception.common.NotFoundException
import com.few.api.repo.dao.subscription.SubscriptionDao
import com.few.api.repo.dao.subscription.command.UpdateDeletedAtInAllSubscriptionCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.few.api.domain.subscription.service.MemberService
import com.few.api.domain.subscription.service.dto.ReadMemberIdDto
import com.few.api.repo.dao.subscription.SubscriptionDao
import com.few.api.repo.dao.subscription.command.UpdateDeletedAtInWorkbookSubscriptionCommand
import com.few.api.domain.subscription.usecase.`in`.UnsubscribeWorkbookUseCaseIn
import com.few.api.domain.subscription.usecase.dto.UnsubscribeWorkbookUseCaseIn
import com.few.api.exception.common.NotFoundException
import org.springframework.stereotype.Component
import org.springframework.transaction.annotation.Transactional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.subscription.usecase.`in`
package com.few.api.domain.subscription.usecase.dto

data class SubscribeWorkbookUseCaseIn(
val workbookId: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.subscription.usecase.`in`
package com.few.api.domain.subscription.usecase.dto

data class UnsubscribeAllUseCaseIn(
val opinion: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.subscription.usecase.`in`
package com.few.api.domain.subscription.usecase.dto

data class UnsubscribeWorkbookUseCaseIn(
val workbookId: Long,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.domain.workbook.service

import com.few.api.domain.workbook.dto.ArticleDetail
import com.few.api.domain.workbook.usecase.dto.ArticleDetail
import com.few.api.domain.workbook.service.dto.BrowseWorkbookArticlesQuery
import com.few.api.repo.dao.article.ArticleDao
import com.few.api.repo.dao.article.query.SelectWorkbookMappedArticleRecordsQuery
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.domain.workbook.service

import com.few.api.domain.workbook.dto.WriterDetail
import com.few.api.domain.workbook.usecase.dto.WriterDetail
import com.few.api.domain.workbook.service.dto.BrowseWriterRecordsQuery
import com.few.api.repo.dao.member.MemberDao
import com.few.api.repo.dao.member.query.SelectWritersQuery
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.few.api.domain.workbook.usecase

import com.few.api.domain.workbook.dto.ReadWorkbookUseCaseIn
import com.few.api.domain.workbook.dto.ReadWorkbookUseCaseOut
import com.few.api.domain.workbook.usecase.dto.ReadWorkbookUseCaseIn
import com.few.api.domain.workbook.usecase.dto.ReadWorkbookUseCaseOut
import com.few.api.domain.workbook.service.*
import com.few.api.domain.workbook.service.dto.BrowseWorkbookArticlesQuery
import com.few.api.domain.workbook.service.dto.BrowseWriterRecordsQuery
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.workbook.dto
package com.few.api.domain.workbook.usecase.dto

data class ReadWorkbookUseCaseIn(
val workbookId: Long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.few.api.domain.workbook.dto
package com.few.api.domain.workbook.usecase.dto

import java.net.URL
import java.time.LocalDateTime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.few.api.web.controller.admin

import com.few.api.domain.admin.document.dto.*
import com.few.api.domain.admin.document.usecase.*
import com.few.api.domain.admin.document.usecase.dto.*
import com.few.api.web.controller.admin.request.AddArticleRequest
import com.few.api.web.controller.admin.request.AddWorkbookRequest
import com.few.api.web.controller.admin.request.ConvertContentRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.few.api.web.controller.admin

import com.few.api.domain.admin.document.dto.*
import com.few.api.domain.admin.document.usecase.*
import com.few.api.domain.log.AddApiLogUseCase
import com.few.api.domain.log.dto.AddApiLogUseCaseIn
import com.few.api.web.controller.admin.request.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.web.controller.admin.response

import com.few.api.domain.admin.document.dto.AddArticleUseCaseOut
import com.few.api.domain.admin.document.usecase.dto.AddArticleUseCaseOut

data class AddArticleResponse(
val articleId: Long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.web.controller.article

import com.few.api.domain.article.dto.ReadArticleUseCaseIn
import com.few.api.domain.article.usecase.dto.ReadArticleUseCaseIn
import com.few.api.domain.article.usecase.ReadArticleUseCase
import com.few.api.web.controller.article.response.ReadArticleResponse
import com.few.api.web.support.ApiResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.web.controller.article.response

import com.few.api.domain.article.dto.ReadArticleUseCaseOut
import com.few.api.domain.article.usecase.dto.ReadArticleUseCaseOut
import java.net.URL
import java.time.LocalDateTime

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import com.few.api.web.support.ApiResponse
import com.few.api.web.support.ApiResponseGenerator
import com.few.api.domain.problem.usecase.CheckProblemUseCase
import com.few.api.domain.problem.usecase.ReadProblemUseCase
import com.few.api.domain.problem.usecase.`in`.BrowseProblemsUseCaseIn
import com.few.api.domain.problem.usecase.`in`.CheckProblemUseCaseIn
import com.few.api.domain.problem.usecase.`in`.ReadProblemUseCaseIn
import com.few.api.domain.problem.usecase.dto.BrowseProblemsUseCaseIn
import com.few.api.domain.problem.usecase.dto.CheckProblemUseCaseIn
import com.few.api.domain.problem.usecase.dto.ReadProblemUseCaseIn
import com.few.api.web.controller.problem.response.BrowseProblemsResponse
import jakarta.validation.Valid
import jakarta.validation.constraints.Min
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import com.few.api.web.support.ApiResponseGenerator
import com.few.api.domain.subscription.usecase.SubscribeWorkbookUseCase
import com.few.api.domain.subscription.usecase.UnsubscribeAllUseCase
import com.few.api.domain.subscription.usecase.UnsubscribeWorkbookUseCase
import com.few.api.domain.subscription.usecase.`in`.SubscribeWorkbookUseCaseIn
import com.few.api.domain.subscription.usecase.`in`.UnsubscribeAllUseCaseIn
import com.few.api.domain.subscription.usecase.`in`.UnsubscribeWorkbookUseCaseIn
import com.few.api.domain.subscription.usecase.dto.SubscribeWorkbookUseCaseIn
import com.few.api.domain.subscription.usecase.dto.UnsubscribeAllUseCaseIn
import com.few.api.domain.subscription.usecase.dto.UnsubscribeWorkbookUseCaseIn
import com.few.api.web.controller.subscription.request.UnsubscribeAllRequest
import jakarta.validation.Valid
import jakarta.validation.constraints.Min
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.web.controller.workbook

import com.few.api.domain.workbook.dto.ReadWorkbookUseCaseIn
import com.few.api.domain.workbook.usecase.dto.ReadWorkbookUseCaseIn
import com.few.api.domain.workbook.usecase.ReadWorkbookUseCase
import com.few.api.web.controller.workbook.response.ReadWorkBookResponse
import com.few.api.web.support.ApiResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.few.api.web.controller.workbook.response

import com.few.api.domain.workbook.dto.ReadWorkbookUseCaseOut
import com.few.api.domain.workbook.usecase.dto.ReadWorkbookUseCaseOut
import java.net.URL
import java.time.LocalDateTime

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.epages.restdocs.apispec.Schema
import com.fasterxml.jackson.databind.ObjectMapper
import com.few.api.domain.admin.document.dto.*
import com.few.api.domain.admin.document.usecase.*
import com.few.api.domain.admin.document.usecase.dto.*
import com.few.api.web.controller.ControllerTestSpec
import com.few.api.web.controller.admin.request.*
import com.few.api.web.controller.admin.response.ImageSourceResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import com.epages.restdocs.apispec.ResourceDocumentation.parameterWithName
import com.epages.restdocs.apispec.ResourceSnippetParameters
import com.epages.restdocs.apispec.Schema
import com.fasterxml.jackson.databind.ObjectMapper
import com.few.api.domain.article.dto.ReadArticleUseCaseIn
import com.few.api.domain.article.dto.ReadArticleUseCaseOut
import com.few.api.domain.article.dto.WriterDetail
import com.few.api.domain.article.usecase.dto.ReadArticleUseCaseIn
import com.few.api.domain.article.usecase.dto.ReadArticleUseCaseOut
import com.few.api.domain.article.usecase.dto.WriterDetail
import com.few.api.domain.article.usecase.ReadArticleUseCase
import com.few.api.web.controller.ControllerTestSpec
import com.few.api.web.controller.description.Description
Expand Down
Loading

0 comments on commit 8f59204

Please sign in to comment.