From 617b7002c89b33a3af7926a7635274d15d5eaaef Mon Sep 17 00:00:00 2001 From: coehgns Date: Wed, 15 Oct 2025 11:15:44 +0900 Subject: [PATCH 1/5] =?UTF-8?q?chore=20(=20#38=20)=20:=20faq=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../faq/adapter/in/web/FaqWebAdapter.kt | 123 ------------ .../in/web/dto/request/CreateFaqRequest.kt | 15 -- .../in/web/dto/request/UpdateFaqRequest.kt | 15 -- .../in/web/dto/response/FaqDetailsResponse.kt | 20 -- .../faq/adapter/in/web/dto/response/FaqDto.kt | 23 --- .../in/web/dto/response/FaqListResponse.kt | 11 -- .../dto/response/FaqTitleAndTypeResponse.kt | 18 -- .../in/web/dto/response/FaqTitleResponse.kt | 17 -- .../faq/adapter/out/entity/FaqJpaEntity.kt | 31 --- .../faq/adapter/out/mapper/FaqMapper.kt | 28 --- .../out/persistence/FaqPersistenceAdapter.kt | 78 -------- .../persistence/repository/FaqRepository.kt | 28 --- .../application/port/in/CreateFaqUseCase.kt | 16 -- .../application/port/in/DeleteFaqUseCase.kt | 16 -- .../port/in/QueryFaqDetailsUseCase.kt | 18 -- .../port/in/QueryFaqListByTypeUseCase.kt | 18 -- .../port/in/QueryFaqListUseCase.kt | 16 -- .../application/port/in/QueryTopFaqUseCase.kt | 16 -- .../application/port/in/UpdateFaqUseCase.kt | 21 -- .../faq/application/port/out/DeleteFaqPort.kt | 16 -- .../faq/application/port/out/FaqPort.kt | 10 - .../faq/application/port/out/FindFaqPort.kt | 41 ---- .../faq/application/port/out/SaveFaqPort.kt | 17 -- .../application/service/CreateFaqService.kt | 38 ---- .../application/service/DeleteFaqService.kt | 31 --- .../service/QueryFaqDetailsService.kt | 35 ---- .../service/QueryFaqListByTypeService.kt | 38 ---- .../service/QueryFaqListService.kt | 36 ---- .../application/service/QueryTopFaqService.kt | 32 --- .../application/service/UpdateFaqService.kt | 46 ----- .../faq/exception/FaqNotFoundException.kt | 14 -- .../kr/entrydsm/feed/domain/faq/model/Faq.kt | 47 ----- .../feed/domain/faq/model/type/FaqType.kt | 9 - .../application/port/out/FindScreenPort.kt | 25 --- .../global/document/faq/FaqApiDocument.kt | 183 ------------------ 35 files changed, 1146 deletions(-) delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/CreateFaqRequest.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/UpdateFaqRequest.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDetailsResponse.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDto.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqListResponse.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleAndTypeResponse.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleResponse.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/entity/FaqJpaEntity.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/mapper/FaqMapper.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/FaqPersistenceAdapter.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/repository/FaqRepository.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/CreateFaqUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/DeleteFaqUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqDetailsUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListByTypeUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryTopFaqUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/UpdateFaqUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/DeleteFaqPort.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FaqPort.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FindFaqPort.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/SaveFaqPort.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/CreateFaqService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/DeleteFaqService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqDetailsService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListByTypeService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryTopFaqService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/UpdateFaqService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/exception/FaqNotFoundException.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/Faq.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/type/FaqType.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/FindScreenPort.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/faq/FaqApiDocument.kt diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt deleted file mode 100644 index b086ecf..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt +++ /dev/null @@ -1,123 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.CreateFaqRequest -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.UpdateFaqRequest -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqDetailsResponse -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqListResponse -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.CreateFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.DeleteFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryFaqDetailsUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryFaqListByTypeUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryFaqListUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryTopFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.UpdateFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import hs.kr.entrydsm.feed.global.document.faq.FaqApiDocument -import org.springframework.http.HttpStatus -import org.springframework.validation.annotation.Validated -import org.springframework.web.bind.annotation.DeleteMapping -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.PatchMapping -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.PostMapping -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.ResponseStatus -import org.springframework.web.bind.annotation.RestController -import java.util.UUID - -/** - * FAQ 관련 HTTP 요청을 처리하는 웹 어댑터 클래스입니다. - * - * 이 클래스는 FAQ와 관련된 모든 HTTP 엔드포인트를 제공하며, - * 클라이언트의 요청을 적절한 유스케이스로 라우팅합니다. - * - * @property createFaqUseCase FAQ 생성 유스케이스 - * @property deleteFaqUseCase FAQ 삭제 유스케이스 - * @property queryFaqDetailsUseCase FAQ 상세 정보 조회 유스케이스 - * @property queryFaqListByTypeUseCase FAQ 유형별 목록 조회 유스케이스 - * @property queryFaqListUseCase FAQ 전체 목록 조회 유스케이스 - * @property queryTopFaqUseCase 최근 FAQ 목록 조회 유스케이스 - * @property updateFaqUseCase FAQ 수정 유스케이스 - */ -@RequestMapping("/faq") -@RestController -class FaqWebAdapter( - private val createFaqUseCase: CreateFaqUseCase, - private val deleteFaqUseCase: DeleteFaqUseCase, - private val queryFaqDetailsUseCase: QueryFaqDetailsUseCase, - private val queryFaqListByTypeUseCase: QueryFaqListByTypeUseCase, - private val queryFaqListUseCase: QueryFaqListUseCase, - private val queryTopFaqUseCase: QueryTopFaqUseCase, - private val updateFaqUseCase: UpdateFaqUseCase, -) : FaqApiDocument { - - @ResponseStatus(HttpStatus.CREATED) - @PostMapping - override fun createFaq( - @RequestBody @Validated - createFaqRequest: CreateFaqRequest, - ) = createFaqUseCase.execute(createFaqRequest) - - /** - * 특정 FAQ의 상세 정보를 조회합니다. - * - * @param faqId 조회할 FAQ의 고유 식별자 - * @return FAQ 상세 정보가 포함된 응답 객체 - */ - @GetMapping("/{faq-id}") - override fun queryFaqDetails( - @PathVariable("faq-id") faqId: UUID, - ): FaqDetailsResponse = queryFaqDetailsUseCase.execute(faqId) - - /** - * 특정 유형의 FAQ 목록을 조회합니다. - * - * @param faqType 조회할 FAQ 유형 - * @return 해당 유형의 FAQ 목록이 포함된 응답 객체 - */ - @GetMapping - override fun queryFaqListByType( - @RequestParam("type") faqType: FaqType, - ): FaqListResponse = queryFaqListByTypeUseCase.execute(faqType) - - /** - * 모든 FAQ 목록을 조회합니다. - * - * @return 모든 FAQ 목록이 포함된 응답 객체 - */ - @GetMapping("/all") - override fun queryFaqList(): FaqListResponse = queryFaqListUseCase.execute() - - /** - * 최근에 등록된 FAQ 목록을 조회합니다. - * - * @return 최근 FAQ 목록이 포함된 응답 객체 - */ - @GetMapping("/recently") - override fun queryTopFaq() = queryTopFaqUseCase.execute() - - /** - * 기존 FAQ를 수정합니다. - * - * @param faqId 수정할 FAQ의 고유 식별자 - * @param updateFaqRequest FAQ 수정 요청 데이터 - */ - @PatchMapping("/{faq-id}") - override fun updateFaq( - @PathVariable("faq-id") faqId: UUID, - @RequestBody @Validated - updateFaqRequest: UpdateFaqRequest, - ) = updateFaqUseCase.execute(faqId, updateFaqRequest) - - /** - * 특정 FAQ를 삭제합니다. - * - * @param faqId 삭제할 FAQ의 고유 식별자 - */ - @DeleteMapping("/{faq-id}") - override fun deleteFaq( - @PathVariable("faq-id") faqId: UUID, - ) = deleteFaqUseCase.execute(faqId) -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/CreateFaqRequest.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/CreateFaqRequest.kt deleted file mode 100644 index 481cab0..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/CreateFaqRequest.kt +++ /dev/null @@ -1,15 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request - -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import jakarta.validation.constraints.NotBlank -import jakarta.validation.constraints.Size - -data class CreateFaqRequest( - @field:NotBlank(message = "title은 null, 공백, 띄어쓰기를 허용하지 않습니다.") - @field:Size(max = 100, message = "title은 최대 100자까지 가능합니다.") - val title: String, - @field:NotBlank(message = "content은 null, 공백, 띄어쓰기를 허용하지 않습니다.") - @field:Size(max = 5000, message = "content는 최대 5000자까지 가능합니다.") - val content: String, - val faqType: FaqType, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/UpdateFaqRequest.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/UpdateFaqRequest.kt deleted file mode 100644 index e9398dd..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/request/UpdateFaqRequest.kt +++ /dev/null @@ -1,15 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request - -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import jakarta.validation.constraints.NotBlank -import jakarta.validation.constraints.Size - -data class UpdateFaqRequest( - @field:NotBlank(message = "title은 null, 공백, 띄어쓰기를 허용하지 않습니다.") - @field:Size(max = 100, message = "title은 최대 100자까지 가능합니다.") - val title: String, - @field:NotBlank(message = "content은 null, 공백, 띄어쓰기를 허용하지 않습니다.") - @field:Size(max = 5000, message = "content는 최대 5000자까지 가능합니다.") - val content: String, - val faqType: FaqType, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDetailsResponse.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDetailsResponse.kt deleted file mode 100644 index 361fc7c..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDetailsResponse.kt +++ /dev/null @@ -1,20 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response - -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import java.time.LocalDateTime - -/** - * FAQ 상세 조회 응답을 위한 데이터 클래스입니다. - * FAQ의 상세 내용을 보여줄 때 사용됩니다. - * - * @property title FAQ 제목 - * @property content FAQ 상세 내용 - * @property createdAt FAQ 생성 일시 - * @property faqType FAQ 유형 (카테고리) - */ -data class FaqDetailsResponse( - val title: String, - val content: String, - val createdAt: LocalDateTime, - val faqType: FaqType, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDto.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDto.kt deleted file mode 100644 index 622967a..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqDto.kt +++ /dev/null @@ -1,23 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response - -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import java.time.LocalDateTime -import java.util.UUID - -/** - * FAQ 정보를 나타내는 데이터 전송 객체(DTO)입니다. - * FAQ 목록 조회 시 각 FAQ 항목의 정보를 담는 데 사용됩니다. - * - * @property id FAQ 고유 식별자 - * @property title FAQ 제목 - * @property content FAQ 내용 - * @property createdAt FAQ 생성 일시 - * @property faqType FAQ 유형 (카테고리) - */ -data class FaqDto( - val id: UUID, - val title: String, - val content: String, - val createdAt: LocalDateTime, - val faqType: FaqType, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqListResponse.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqListResponse.kt deleted file mode 100644 index fd7d5ef..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqListResponse.kt +++ /dev/null @@ -1,11 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response - -/** - * FAQ 목록 응답을 위한 데이터 클래스입니다. - * 여러 개의 FAQ 정보를 리스트 형태로 반환할 때 사용됩니다. - * - * @property faqs FAQ 정보 목록 (FaqDto 리스트) - */ -data class FaqListResponse( - val faqs: List, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleAndTypeResponse.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleAndTypeResponse.kt deleted file mode 100644 index bb70bf5..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleAndTypeResponse.kt +++ /dev/null @@ -1,18 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response - -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import java.util.UUID - -/** - * FAQ 제목과 유형 정보를 포함하는 응답 데이터 클래스입니다. - * FAQ 목록에서 제목과 유형을 함께 보여줄 때 사용됩니다. - * - * @property id FAQ 고유 식별자 - * @property type FAQ 유형 (카테고리) - * @property title FAQ 제목 - */ -data class FaqTitleAndTypeResponse( - val id: UUID, - val type: FaqType, - val title: String, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleResponse.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleResponse.kt deleted file mode 100644 index 269c25d..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/dto/response/FaqTitleResponse.kt +++ /dev/null @@ -1,17 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response - -import java.util.UUID - -/** - * FAQ 제목 목록 조회 응답을 위한 데이터 클래스입니다. - * FAQ 목록에서 제목과 간략한 내용을 보여줄 때 사용됩니다. - * - * @property id FAQ 고유 식별자 - * @property title FAQ 제목 - * @property content FAQ 내용 (요약된 내용일 수 있음) - */ -data class FaqTitleResponse( - val id: UUID, - val title: String, - val content: String, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/entity/FaqJpaEntity.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/entity/FaqJpaEntity.kt deleted file mode 100644 index 219d7d4..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/entity/FaqJpaEntity.kt +++ /dev/null @@ -1,31 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.out.entity - -import hs.kr.entrydsm.feed.global.entity.BaseEntity -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import jakarta.persistence.Column -import jakarta.persistence.Entity -import jakarta.persistence.EnumType -import jakarta.persistence.Enumerated -import java.util.UUID - -/** - * FAQ 정보를 데이터베이스에 저장하기 위한 JPA 엔티티 클래스입니다. - * - * @property title FAQ 제목 (최대 100자) - * @property content FAQ 내용 (최대 5000자) - * @property faqType FAQ 유형 (FaqType ENUM) - * @property adminId FAQ를 작성한 관리자 ID (UUID) - * @param id 엔티티의 고유 식별자 (생성 시 자동 생성됨) - */ -@Entity(name = "tbl_faq") -class FaqJpaEntity( - id: UUID? = null, - @Column(name = "title", length = 100, nullable = false) - var title: String, - @Column(name = "content", length = 5000, nullable = false) - var content: String, - @Enumerated(EnumType.STRING) - var faqType: FaqType, - @Column(name = "admin_id", columnDefinition = "BINARY(16)", nullable = false) - var adminId: UUID, -) : BaseEntity(id) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/mapper/FaqMapper.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/mapper/FaqMapper.kt deleted file mode 100644 index 57656cd..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/mapper/FaqMapper.kt +++ /dev/null @@ -1,28 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.out.mapper - -import hs.kr.entrydsm.feed.domain.faq.adapter.out.entity.FaqJpaEntity -import hs.kr.entrydsm.feed.domain.faq.model.Faq -import org.mapstruct.Mapper - -/** - * FAQ 도메인 모델과 JPA 엔티티 간의 변환을 담당하는 매퍼 인터페이스입니다. - * MapStruct를 사용하여 구현체가 자동으로 생성됩니다. - */ -@Mapper(componentModel = "spring") -interface FaqMapper { - /** - * JPA 엔티티를 FAQ 도메인 모델로 변환합니다. - * - * @param entity 변환할 FaqJpaEntity 인스턴스 - * @return 변환된 FAQ 도메인 모델 - */ - fun toModel(entity: FaqJpaEntity): Faq - - /** - * FAQ 도메인 모델을 JPA 엔티티로 변환합니다. - * - * @param model 변환할 FAQ 도메인 모델 - * @return 변환된 FaqJpaEntity 인스턴스 - */ - fun toEntity(model: Faq): FaqJpaEntity -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/FaqPersistenceAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/FaqPersistenceAdapter.kt deleted file mode 100644 index 501a13f..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/FaqPersistenceAdapter.kt +++ /dev/null @@ -1,78 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.out.persistence - -import hs.kr.entrydsm.feed.domain.faq.adapter.out.mapper.FaqMapper -import hs.kr.entrydsm.feed.domain.faq.adapter.out.persistence.repository.FaqRepository -import hs.kr.entrydsm.feed.domain.faq.application.port.out.FaqPort -import hs.kr.entrydsm.feed.domain.faq.model.Faq -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import org.springframework.data.repository.findByIdOrNull -import org.springframework.stereotype.Component -import java.util.UUID - -/** - * FAQ 도메인과 데이터베이스 간의 상호작용을 담당하는 어댑터 클래스입니다. - * - * @property faqRepository FAQ 엔티티를 데이터베이스에서 조작하기 위한 리포지토리 - * @property faqMapper FAQ 도메인 객체와 엔티티 간의 변환을 담당하는 매퍼 - */ -@Component -class FaqPersistenceAdapter( - private val faqRepository: FaqRepository, - private val faqMapper: FaqMapper, -) : FaqPort { - - /** - * FAQ를 저장하거나 업데이트합니다. - * - * @param faq 저장할 FAQ 도메인 모델 - * @return 저장된 FAQ 도메인 모델 - */ - override fun saveFaq(faq: Faq): Faq = faqMapper.toModel(faqRepository.save(faqMapper.toEntity(faq))) - - /** - * FAQ를 삭제합니다. - * - * @param faq 삭제할 FAQ 도메인 모델 - */ - override fun deleteFaq(faq: Faq) { - faqRepository.delete(faqMapper.toEntity(faq)) - } - - /** - * ID로 FAQ를 조회합니다. - * - * @param faqId 조회할 FAQ의 고유 식별자 - * @return 조회된 FAQ 도메인 모델, 존재하지 않을 경우 null 반환 - */ - override fun findByIdOrNull(faqId: UUID): Faq? = - faqRepository.findByIdOrNull(faqId)?.let { faqMapper.toModel(it) } - - /** - * 특정 유형의 FAQ 목록을 조회합니다. - * - * @param faqType 조회할 FAQ 유형 - * @return 조회된 FAQ 도메인 모델 목록 - */ - override fun findAllByFaqType(faqType: FaqType): List { - return faqRepository.findAllByFaqType(faqType).map { faqMapper.toModel(it) } - } - - /** - * 모든 FAQ 목록을 조회합니다. - * - * @return 모든 FAQ 도메인 모델 목록 - */ - override fun findAll(): List { - return faqRepository.findAll().map { faqMapper.toModel(it) } - } - - /** - * 최근에 생성된 상위 5개의 FAQ를 조회합니다. - * 생성일자 기준 내림차순으로 정렬됩니다. - * - * @return 최근 FAQ 5개의 도메인 모델 목록 - */ - override fun findTop5ByOrderByCreatedAtDesc(): List { - return faqRepository.findTop5ByOrderByCreatedAtDesc().map { faqMapper.toModel(it) } - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/repository/FaqRepository.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/repository/FaqRepository.kt deleted file mode 100644 index dabf9bb..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/out/persistence/repository/FaqRepository.kt +++ /dev/null @@ -1,28 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.adapter.out.persistence.repository - -import hs.kr.entrydsm.feed.domain.faq.adapter.out.entity.FaqJpaEntity -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import org.springframework.data.jpa.repository.JpaRepository -import java.util.UUID - -/** - * FAQ 데이터에 접근하기 위한 JPA Repository 인터페이스입니다. - * FAQ 엔티티의 CRUD 및 커스텀 쿼리 메서드를 제공합니다. - */ -interface FaqRepository : JpaRepository { - /** - * 주어진 FAQ 유형에 해당하는 모든 FAQ 엔티티를 조회합니다. - * - * @param faqType 조회할 FAQ 유형 - * @return 조회된 FAQ 엔티티 목록 (없을 경우 빈 목록 반환) - */ - fun findAllByFaqType(faqType: FaqType): List - - /** - * 최근에 생성된 상위 5개의 FAQ 엔티티를 조회합니다. - * 생성일자(createdAt) 기준으로 내림차순 정렬됩니다. - * - * @return 최근 생성된 FAQ 엔티티 목록 (최대 5개, 없을 경우 빈 목록 반환) - */ - fun findTop5ByOrderByCreatedAtDesc(): List -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/CreateFaqUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/CreateFaqUseCase.kt deleted file mode 100644 index fc36b1d..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/CreateFaqUseCase.kt +++ /dev/null @@ -1,16 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.`in` - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.CreateFaqRequest - -/** - * FAQ 생성을 위한 유스케이스 인터페이스입니다. - * FAQ 도메인에서 새로운 FAQ를 생성하는 역할을 담당합니다. - */ -interface CreateFaqUseCase { - /** - * 새로운 FAQ를 생성합니다. - * - * @param createFaqRequest FAQ 생성 요청 데이터 - */ - fun execute(createFaqRequest: CreateFaqRequest) -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/DeleteFaqUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/DeleteFaqUseCase.kt deleted file mode 100644 index d7b7119..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/DeleteFaqUseCase.kt +++ /dev/null @@ -1,16 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.`in` - -import java.util.UUID - -/** - * FAQ 삭제를 위한 유스케이스 인터페이스입니다. - * FAQ 도메인에서 특정 FAQ를 삭제하는 역할을 담당합니다. - */ -interface DeleteFaqUseCase { - /** - * 특정 FAQ를 삭제합니다. - * - * @param faqId 삭제할 FAQ의 고유 식별자 - */ - fun execute(faqId: UUID) -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqDetailsUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqDetailsUseCase.kt deleted file mode 100644 index cc39b05..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqDetailsUseCase.kt +++ /dev/null @@ -1,18 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.`in` - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqDetailsResponse -import java.util.UUID - -/** - * FAQ 상세 정보 조회를 위한 유스케이스 인터페이스입니다. - * FAQ 도메인에서 특정 FAQ의 상세 정보를 조회하는 역할을 담당합니다. - */ -interface QueryFaqDetailsUseCase { - /** - * 특정 FAQ의 상세 정보를 조회합니다. - * - * @param faqId 조회할 FAQ의 고유 식별자 - * @return FAQ 상세 정보 응답 - */ - fun execute(faqId: UUID): FaqDetailsResponse -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListByTypeUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListByTypeUseCase.kt deleted file mode 100644 index 3586109..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListByTypeUseCase.kt +++ /dev/null @@ -1,18 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.`in` - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqListResponse -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType - -/** - * 특정 유형의 FAQ 목록 조회를 위한 유스케이스 인터페이스입니다. - * FAQ 도메인에서 특정 유형에 해당하는 FAQ 목록을 조회하는 역할을 담당합니다. - */ -interface QueryFaqListByTypeUseCase { - /** - * 특정 유형의 FAQ 목록을 조회합니다. - * - * @param faqType 조회할 FAQ 유형 - * @return FAQ 목록 응답 - */ - fun execute(faqType: FaqType): FaqListResponse -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListUseCase.kt deleted file mode 100644 index fc5ec84..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryFaqListUseCase.kt +++ /dev/null @@ -1,16 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.`in` - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqListResponse - -/** - * FAQ 목록 조회를 위한 유스케이스 인터페이스입니다. - * FAQ 도메인에서 모든 FAQ 목록을 조회하는 역할을 담당합니다. - */ -interface QueryFaqListUseCase { - /** - * 모든 FAQ 목록을 조회합니다. - * - * @return FAQ 목록 응답 - */ - fun execute(): FaqListResponse -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryTopFaqUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryTopFaqUseCase.kt deleted file mode 100644 index 5d75581..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/QueryTopFaqUseCase.kt +++ /dev/null @@ -1,16 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.`in` - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqTitleResponse - -/** - * 상위 FAQ 조회를 위한 유스케이스 인터페이스입니다. - * FAQ 도메인에서 상위에 노출될 FAQ 목록을 조회하는 역할을 담당합니다. - */ -interface QueryTopFaqUseCase { - /** - * 상위 FAQ 목록을 조회합니다. - * - * @return FAQ 제목 목록 응답 - */ - fun execute(): List -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/UpdateFaqUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/UpdateFaqUseCase.kt deleted file mode 100644 index 2c8d919..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/in/UpdateFaqUseCase.kt +++ /dev/null @@ -1,21 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.`in` - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.UpdateFaqRequest -import java.util.UUID - -/** - * FAQ 수정을 위한 유스케이스 인터페이스입니다. - * FAQ 도메인에서 기존 FAQ를 수정하는 역할을 담당합니다. - */ -interface UpdateFaqUseCase { - /** - * 특정 FAQ를 수정합니다. - * - * @param faqId 수정할 FAQ의 고유 식별자 - * @param updateFaqRequest FAQ 수정 요청 데이터 - */ - fun execute( - faqId: UUID, - updateFaqRequest: UpdateFaqRequest, - ) -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/DeleteFaqPort.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/DeleteFaqPort.kt deleted file mode 100644 index 3646846..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/DeleteFaqPort.kt +++ /dev/null @@ -1,16 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.out - -import hs.kr.entrydsm.feed.domain.faq.model.Faq - -/** - * FAQ 삭제를 위한 포트 인터페이스입니다. - * FAQ 도메인 객체를 삭제하는 메서드를 정의합니다. - */ -interface DeleteFaqPort { - /** - * FAQ를 삭제합니다. - * - * @param faq 삭제할 FAQ 도메인 객체 - */ - fun deleteFaq(faq: Faq) -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FaqPort.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FaqPort.kt deleted file mode 100644 index f6f238c..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FaqPort.kt +++ /dev/null @@ -1,10 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.out - -/** - * FAQ 관련 모든 포트 인터페이스를 통합한 포트입니다. - * FAQ 데이터의 CRUD 작업을 위한 모든 인터페이스를 상속받습니다. - */ -interface FaqPort : - DeleteFaqPort, - FindFaqPort, - SaveFaqPort diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FindFaqPort.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FindFaqPort.kt deleted file mode 100644 index e5e0a11..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/FindFaqPort.kt +++ /dev/null @@ -1,41 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.out - -import hs.kr.entrydsm.feed.domain.faq.model.Faq -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import java.util.UUID - -/** - * FAQ 조회를 위한 포트 인터페이스입니다. - * FAQ 도메인 객체를 다양한 방식으로 조회하는 메서드를 정의합니다. - */ -interface FindFaqPort { - /** - * FAQ ID로 FAQ를 조회합니다. - * - * @param faqId 조회할 FAQ의 고유 식별자 - * @return 조회된 FAQ 객체, 없을 경우 null - */ - fun findByIdOrNull(faqId: UUID): Faq? - - /** - * 특정 유형의 모든 FAQ를 조회합니다. - * - * @param faqType 조회할 FAQ 유형 - * @return 해당 유형의 FAQ 목록 (없을 경우 빈 목록) - */ - fun findAllByFaqType(faqType: FaqType): List - - /** - * 모든 FAQ를 조회합니다. - * - * @return 모든 FAQ 목록 (없을 경우 빈 목록) - */ - fun findAll(): List - - /** - * 생성일시 기준으로 최신 FAQ 5개를 조회합니다. - * - * @return 최신순으로 정렬된 FAQ 5개 목록 (5개 미만일 경우 모두 반환) - */ - fun findTop5ByOrderByCreatedAtDesc(): List -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/SaveFaqPort.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/SaveFaqPort.kt deleted file mode 100644 index 885c836..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/port/out/SaveFaqPort.kt +++ /dev/null @@ -1,17 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.port.out - -import hs.kr.entrydsm.feed.domain.faq.model.Faq - -/** - * FAQ 저장을 위한 포트 인터페이스입니다. - * FAQ 도메인 객체를 저장하는 메서드를 정의합니다. - */ -interface SaveFaqPort { - /** - * FAQ를 저장하거나 업데이트합니다. - * - * @param faq 저장할 FAQ 도메인 객체 - * @return 저장된 FAQ 도메인 객체 (ID가 할당됨) - */ - fun saveFaq(faq: Faq): Faq -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/CreateFaqService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/CreateFaqService.kt deleted file mode 100644 index 2cf45bd..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/CreateFaqService.kt +++ /dev/null @@ -1,38 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.service - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.CreateFaqRequest -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.CreateFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.out.SaveFaqPort -import hs.kr.entrydsm.feed.global.utils.user.UserUtils -import hs.kr.entrydsm.feed.domain.faq.model.Faq -import org.springframework.stereotype.Service - -/** - * FAQ 생성을 처리하는 서비스 클래스입니다. - * - * @property saveFaqPort FAQ 저장을 위한 포트 - * @property userUtils 현재 사용자 정보를 조회하기 위한 유틸리티 - */ -@Service -class CreateFaqService( - private val saveFaqPort: SaveFaqPort, - private val userUtils: UserUtils, -) : CreateFaqUseCase { - /** - * 새로운 FAQ를 생성합니다. - * - * @param createFaqRequest FAQ 생성 요청 데이터 - * @throws hs.kr.entrydsm.feed.global.exception.UnauthorizedException 현재 사용자가 인증되지 않은 경우 - */ - override fun execute(createFaqRequest: CreateFaqRequest) { - val faq = - Faq( - title = createFaqRequest.title, - content = createFaqRequest.content, - faqType = createFaqRequest.faqType, - adminId = userUtils.getCurrentUserId(), - ) - - saveFaqPort.saveFaq(faq) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/DeleteFaqService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/DeleteFaqService.kt deleted file mode 100644 index b6bc0ee..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/DeleteFaqService.kt +++ /dev/null @@ -1,31 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.service - -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.DeleteFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.out.DeleteFaqPort -import hs.kr.entrydsm.feed.domain.faq.application.port.out.FindFaqPort -import hs.kr.entrydsm.feed.domain.faq.exception.FaqNotFoundException -import org.springframework.stereotype.Service -import java.util.UUID - -/** - * FAQ 삭제를 처리하는 서비스 클래스입니다. - * - * @property findFaqPort FAQ 조회를 위한 포트 - * @property deleteFaqPort FAQ 삭제를 위한 포트 - */ -@Service -class DeleteFaqService( - private val findFaqPort: FindFaqPort, - private val deleteFaqPort: DeleteFaqPort, -) : DeleteFaqUseCase { - /** - * 지정된 ID의 FAQ를 삭제합니다. - * - * @param faqId 삭제할 FAQ의 고유 식별자 - * @throws hs.kr.entrydsm.feed.domain.faq.exception.FaqNotFoundException ID의 FAQ를 찾을 수 없는 경우 - */ - override fun execute(faqId: UUID) { - val faq = findFaqPort.findByIdOrNull(faqId) ?: throw FaqNotFoundException - deleteFaqPort.deleteFaq(faq) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqDetailsService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqDetailsService.kt deleted file mode 100644 index 15256b6..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqDetailsService.kt +++ /dev/null @@ -1,35 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.service - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqDetailsResponse -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryFaqDetailsUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.out.FindFaqPort -import hs.kr.entrydsm.feed.domain.faq.exception.FaqNotFoundException -import org.springframework.stereotype.Service -import java.util.UUID - -/** - * FAQ 상세 조회를 처리하는 서비스 클래스입니다. - * - * @property findFaqPort FAQ 조회를 위한 포트 - */ -@Service -class QueryFaqDetailsService( - private val findFaqPort: FindFaqPort, -) : QueryFaqDetailsUseCase { - /** - * 지정된 ID의 FAQ 상세 정보를 조회합니다. - * - * @param faqId 조회할 FAQ의 고유 식별자 - * @return FAQ 상세 정보 응답 - * @throws hs.kr.entrydsm.feed.domain.faq.exception.FaqNotFoundException 지정된 ID의 FAQ를 찾을 수 없는 경우 - */ - override fun execute(faqId: UUID): FaqDetailsResponse { - val faq = findFaqPort.findByIdOrNull(faqId) ?: throw FaqNotFoundException - return FaqDetailsResponse( - title = faq.title, - content = faq.content, - createdAt = faq.createdAt, - faqType = faq.faqType, - ) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListByTypeService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListByTypeService.kt deleted file mode 100644 index fa8038d..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListByTypeService.kt +++ /dev/null @@ -1,38 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.service - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqDto -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqListResponse -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryFaqListByTypeUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.out.FindFaqPort -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import org.springframework.stereotype.Service - -/** - * 특정 유형의 FAQ 목록 조회를 처리하는 서비스 클래스입니다. - * - * @property findFaqPort FAQ 조회를 위한 포트 - */ -@Service -class QueryFaqListByTypeService( - private val findFaqPort: FindFaqPort, -) : QueryFaqListByTypeUseCase { - /** - * 지정된 유형의 FAQ 목록을 조회합니다. - * - * @param faqType 조회할 FAQ 유형 - * @return FAQ 목록 응답 - */ - override fun execute(faqType: FaqType): FaqListResponse { - val faqs = - findFaqPort.findAllByFaqType(faqType).map { - FaqDto( - id = it.id!!, - title = it.title, - content = it.content, - createdAt = it.createdAt, - faqType = it.faqType, - ) - } - return FaqListResponse(faqs) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListService.kt deleted file mode 100644 index f105740..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryFaqListService.kt +++ /dev/null @@ -1,36 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.service - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqDto -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqListResponse -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryFaqListUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.out.FindFaqPort -import org.springframework.stereotype.Service - -/** - * FAQ 목록 조회를 처리하는 서비스 클래스입니다. - * - * @property findFaqPort FAQ 조회를 위한 포트 - */ -@Service -class QueryFaqListService( - private val findFaqPort: FindFaqPort, -) : QueryFaqListUseCase { - /** - * 모든 FAQ 목록을 조회합니다. - * - * @return FAQ 목록 응답 - */ - override fun execute(): FaqListResponse { - val faqs = - findFaqPort.findAll().map { - FaqDto( - id = it.id!!, - title = it.title, - content = it.content, - createdAt = it.createdAt, - faqType = it.faqType, - ) - } - return FaqListResponse(faqs) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryTopFaqService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryTopFaqService.kt deleted file mode 100644 index c92623b..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/QueryTopFaqService.kt +++ /dev/null @@ -1,32 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.service - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqTitleResponse -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryTopFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.out.FindFaqPort -import org.springframework.stereotype.Service - -/** - * 상위 FAQ 조회를 처리하는 서비스 클래스입니다. - * 최근에 생성된 FAQ 중 상위 5개를 조회합니다. - * - * @property findFaqPort FAQ 조회를 위한 포트 - */ -@Service -class QueryTopFaqService( - private val findFaqPort: FindFaqPort, -) : QueryTopFaqUseCase { - /** - * 최근에 생성된 상위 5개의 FAQ 제목 목록을 조회합니다. - * - * @return FAQ 제목 목록 (최대 5개) - */ - override fun execute(): List { - return findFaqPort.findTop5ByOrderByCreatedAtDesc().map { - FaqTitleResponse( - it.id!!, - it.title, - it.content, - ) - } - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/UpdateFaqService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/UpdateFaqService.kt deleted file mode 100644 index 5d5e4ab..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/application/service/UpdateFaqService.kt +++ /dev/null @@ -1,46 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.application.service - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.UpdateFaqRequest -import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.UpdateFaqUseCase -import hs.kr.entrydsm.feed.domain.faq.application.port.out.FindFaqPort -import hs.kr.entrydsm.feed.domain.faq.exception.FaqNotFoundException -import hs.kr.entrydsm.feed.global.utils.user.UserUtils -import org.springframework.stereotype.Service -import org.springframework.transaction.annotation.Transactional -import java.util.UUID - -/** - * FAQ 수정을 처리하는 서비스 클래스입니다. - * - * @property findFaqPort FAQ 조회를 위한 포트 - * @property userUtils 현재 사용자 정보를 조회하기 위한 유틸리티 - */ -@Service -@Transactional -class UpdateFaqService( - private val findFaqPort: FindFaqPort, - private val userUtils: UserUtils, -) : UpdateFaqUseCase { - /** - * 지정된 ID의 FAQ를 업데이트합니다. - * - * @param faqId 업데이트할 FAQ의 고유 식별자 - * @param updateFaqRequest FAQ 업데이트 요청 데이터 - * @throws hs.kr.entrydsm.feed.domain.faq.exception.FaqNotFoundException 지정된 ID의 FAQ를 찾을 수 없는 경우 - * @throws hs.kr.entrydsm.feed.global.exception.UnauthorizedException 현재 사용자에게 권한이 없는 경우 - */ - override fun execute( - faqId: UUID, - updateFaqRequest: UpdateFaqRequest, - ) { - val faq = findFaqPort.findByIdOrNull(faqId) ?: throw FaqNotFoundException - updateFaqRequest.run { - faq.updateFaq( - newTitle = title, - newContent = content, - newFaqType = faqType, - newAdminId = userUtils.getCurrentUserId(), - ) - } - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/exception/FaqNotFoundException.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/exception/FaqNotFoundException.kt deleted file mode 100644 index 386e1fe..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/exception/FaqNotFoundException.kt +++ /dev/null @@ -1,14 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.exception - -import hs.kr.entrydsm.feed.global.error.exception.CasperException -import hs.kr.entrydsm.feed.global.error.exception.ErrorCode - -/** - * FAQ을 찾을 수 없을 때 발생하는 예외 클래스입니다. - * - * @property status HTTP 상태 코드 (404) - * @property message 에러 메시지 - */ -object FaqNotFoundException : CasperException( - ErrorCode.FAQ_NOT_FOUND, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/Faq.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/Faq.kt deleted file mode 100644 index c1995ce..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/Faq.kt +++ /dev/null @@ -1,47 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.model - -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import java.time.LocalDateTime -import java.util.UUID - -/** - * 자주 묻는 질문(FAQ) 도메인 모델 클래스입니다. - * - * @property id FAQ의 고유 식별자 (생성 시 자동 할당) - * @property title FAQ 제목 - * @property content FAQ 내용 - * @property faqType FAQ 유형 (enum) - * @property adminId FAQ를 작성한 관리자 ID - * @property createdAt FAQ 생성 일시 (기본값: 현재 시간) - */ -data class Faq( - val id: UUID? = null, - val title: String, - val content: String, - val faqType: FaqType, - val adminId: UUID, - val createdAt: LocalDateTime = LocalDateTime.now(), -) { - /** - * FAQ 정보를 업데이트합니다. - * - * @param newTitle 새로운 제목 - * @param newContent 새로운 내용 - * @param newFaqType 새로운 FAQ 유형 - * @param newAdminId 수정한 관리자 ID - * @return 업데이트된 FAQ 객체 - */ - fun updateFaq( - newTitle: String, - newContent: String, - newFaqType: FaqType, - newAdminId: UUID, - ): Faq { - return copy( - title = newTitle, - content = newContent, - faqType = newFaqType, - adminId = newAdminId, - ) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/type/FaqType.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/type/FaqType.kt deleted file mode 100644 index 0e803fa..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/model/type/FaqType.kt +++ /dev/null @@ -1,9 +0,0 @@ -package hs.kr.entrydsm.feed.domain.faq.model.type - -enum class FaqType { - ADMISSION, - COURSE, - SCHOOL_LIFE, - DORMITORY, - OTHER, -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/FindScreenPort.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/FindScreenPort.kt deleted file mode 100644 index 1d7f090..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/FindScreenPort.kt +++ /dev/null @@ -1,25 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.port.out - -import hs.kr.entrydsm.feed.domain.screen.model.Screen -import java.util.UUID - -/** - * 화면 조회를 위한 포트 인터페이스입니다. - * 화면 도메인 객체를 다양한 방식으로 조회하는 메서드를 정의합니다. - */ -interface FindScreenPort { - /** - * 모든 화면을 조회합니다. - * - * @return 모든 화면 목록 (없을 경우 빈 목록) - */ - fun findAll(): List - - /** - * 화면 ID로 화면을 조회합니다. - * - * @param screenId 조회할 화면의 고유 식별자 - * @return 조회된 화면 객체, 없을 경우 null - */ - fun findByIdOrNull(screenId: UUID): Screen? -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/faq/FaqApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/faq/FaqApiDocument.kt deleted file mode 100644 index 3e2e2ed..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/faq/FaqApiDocument.kt +++ /dev/null @@ -1,183 +0,0 @@ -package hs.kr.entrydsm.feed.global.document.faq - -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.CreateFaqRequest -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.UpdateFaqRequest -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqDetailsResponse -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqListResponse -import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqTitleResponse -import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType -import io.swagger.v3.oas.annotations.Operation -import io.swagger.v3.oas.annotations.media.Content -import io.swagger.v3.oas.annotations.responses.ApiResponse -import io.swagger.v3.oas.annotations.responses.ApiResponses -import io.swagger.v3.oas.annotations.tags.Tag -import org.springframework.validation.annotation.Validated -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestParam -import java.util.UUID - -/** - * Faq API 문서화를 위한 인터페이스입니다. - */ -@Tag(name = "Faq", description = "자주 묻는 질문 API") -interface FaqApiDocument { - - @Operation( - summary = "Faq 생성", - description = "새로운 FAQ를 생성합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "201", - description = "Faq 생성 성공", - content = arrayOf(Content()) - ) - ) - - /** - * 새로운 FAQ를 생성합니다. - * - * @param createFaqRequest FAQ 생성 요청 데이터 - */ - fun createFaq( - @RequestBody @Validated - createFaqRequest: CreateFaqRequest, - ) - - @Operation( - summary = "Faq 상세 조회", - description = "FAQ를 상세 조회합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "200", - description = "Faq 상세 조회 성공", - content = arrayOf(Content()) - ), - ApiResponse( - responseCode = "404", - description = "Faq를 찾을 수 없습니다. - Faq Not Found", - content = arrayOf(Content()) - ) - ) - /** - * FAQ 상세 정보를 조회합니다. - * - * @param faqId 조회할 FAQ의 ID - * @return FAQ 상세 정보 - */ - fun queryFaqDetails( - @PathVariable("faq-id") faqId: UUID, - ): FaqDetailsResponse - - @Operation( - summary = "종류별 Faq 전체 조회", - description = "종류별 FAQ를 전체 조회합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "200", - description = "종류별 Faq 전체 조회 성공", - content = arrayOf(Content()) - ) - ) - /** - * 특정 유형의 FAQ 목록을 조회합니다. - * - * @param faqType 조회할 FAQ 유형 - * @return FAQ 목록 - */ - fun queryFaqListByType( - @RequestParam("type") faqType: FaqType, - ): FaqListResponse - - @Operation( - summary = "Faq 전체 조회", - description = "FAQ를 전체 조회합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "200", - description = "Faq 전체 조회 성공", - content = arrayOf(Content()) - ) - ) - /** - * 모든 FAQ 목록을 조회합니다. - * - * @return 전체 FAQ 목록 - */ - fun queryFaqList(): FaqListResponse - - @Operation( - summary = "상위 Faq 조회", - description = "최근에 생성된 상위 5개의 FAQ를 조회합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "200", - description = "상위 Faq 조회 성공", - content = arrayOf(Content()) - ) - ) - /** - * 최근에 생성된 상위 5개의 FAQ 제목을 조회합니다. - * - * @return 상위 FAQ 제목 목록 - */ - fun queryTopFaq(): List - - @Operation( - summary = "Faq 수정", - description = "FAQ를 수정합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "200", - description = "Faq 수정 성공", - content = arrayOf(Content()) - ), - ApiResponse( - responseCode = "404", - description = "Faq를 찾을 수 없습니다. - Faq Not Found", - content = arrayOf(Content()) - ) - ) - /** - * 기존 FAQ를 수정합니다. - * - * @param faqId 수정할 FAQ의 ID - * @param updateFaqRequest FAQ 수정 요청 데이터 - */ - fun updateFaq( - @PathVariable("faq-id") faqId: UUID, - @RequestBody @Validated - updateFaqRequest: UpdateFaqRequest, - ) - - @Operation( - summary = "Faq 삭제", - description = "FAQ를 삭제합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "200", - description = "Faq 삭제 성공", - content = arrayOf(Content()) - ), - ApiResponse( - responseCode = "404", - description = "Faq를 찾을 수 없습니다. - Faq Not Found", - content = arrayOf(Content()) - ) - ) - /** - * FAQ를 삭제합니다. - * - * @param faqId 삭제할 FAQ의 ID - */ - fun deleteFaq( - @PathVariable("faq-id") faqId: UUID, - ) -} From 0e7d573579cded873207ea10260a32d485f43e2c Mon Sep 17 00:00:00 2001 From: coehgns Date: Wed, 15 Oct 2025 11:16:18 +0900 Subject: [PATCH 2/5] =?UTF-8?q?chore=20(=20#38=20)=20:=20screen=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/adatper/in/web/ScreenWebAdapter.kt | 70 ------------ .../web/dto/response/QueryScreenResponse.kt | 20 ---- .../in/web/dto/response/ScreenResponse.kt | 11 -- .../adatper/out/entity/ScreenJpaEntity.kt | 21 ---- .../screen/adatper/out/mapper/ScreenMapper.kt | 28 ----- .../persistence/ScreenPersistenceAdapter.kt | 51 --------- .../repository/ScreenRepository.kt | 11 -- .../port/in/CreateScreenUseCase.kt | 13 --- .../application/port/in/QueryScreenUseCase.kt | 16 --- .../port/in/UpdateScreenUseCase.kt | 23 ---- .../application/port/out/SaveScreenPort.kt | 16 --- .../screen/application/port/out/ScreenPort.kt | 9 -- .../service/CreateScreenService.kt | 39 ------- .../application/service/QueryScreenService.kt | 37 ------- .../service/UpdateScreenService.kt | 48 --------- .../exception/ScreenNotFoundException.kt | 14 --- .../feed/domain/screen/model/Screen.kt | 29 ----- .../document/screen/ScreenApiDocument.kt | 102 ------------------ 18 files changed, 558 deletions(-) delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/QueryScreenResponse.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/ScreenResponse.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/entity/ScreenJpaEntity.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/mapper/ScreenMapper.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/ScreenPersistenceAdapter.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/repository/ScreenRepository.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/CreateScreenUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/QueryScreenUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/UpdateScreenUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/SaveScreenPort.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/ScreenPort.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/CreateScreenService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/QueryScreenService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/UpdateScreenService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/exception/ScreenNotFoundException.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/model/Screen.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/screen/ScreenApiDocument.kt diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt deleted file mode 100644 index 1bd1885..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt +++ /dev/null @@ -1,70 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.QueryScreenResponse -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenResponse -import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.CreateScreenUseCase -import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.QueryScreenUseCase -import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.UpdateScreenUseCase -import hs.kr.entrydsm.feed.global.document.screen.ScreenApiDocument -import org.springframework.http.HttpStatus -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.PatchMapping -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.PostMapping -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.ResponseStatus -import org.springframework.web.bind.annotation.RestController -import org.springframework.web.multipart.MultipartFile -import java.util.UUID - -/** - * 화면 정보 관련 HTTP 요청을 처리하는 웹 어댑터 클래스입니다. - * - * 이 클래스는 화면 정보와 관련된 모든 HTTP 엔드포인트를 제공하며, - * 클라이언트의 요청을 적절한 유스케이스로 라우팅합니다. - * - * @property createScreenUseCase 화면 생성 유스케이스 - * @property updateScreenUseCase 화면 수정 유스케이스 - * @property queryScreenUseCase 화면 조회 유스케이스 - */ -@RestController -@RequestMapping("/screen") -class ScreenWebAdapter( - private val createScreenUseCase: CreateScreenUseCase, - private val updateScreenUseCase: UpdateScreenUseCase, - private val queryScreenUseCase: QueryScreenUseCase, -) : ScreenApiDocument { - /** - * 새로운 화면 이미지를 업로드하고 저장합니다. - * - * @param image 업로드할 화면 이미지 파일 - * @return 업로드된 화면 이미지 정보가 포함된 응답 객체 - */ - @ResponseStatus(value = HttpStatus.CREATED) - @PostMapping - override suspend fun createScreen( - @RequestPart(name = "image") image: MultipartFile, - ): ScreenResponse = createScreenUseCase.execute(image) - - /** - * 기존 화면 이미지를 새로운 이미지로 업데이트합니다. - * - * @param id 업데이트할 화면의 고유 식별자 - * @param image 새로운 화면 이미지 파일 - * @return 업데이트된 화면 이미지 정보가 포함된 응답 객체 - */ - @PatchMapping("/{screen-id}") - override fun updateScreen( - @PathVariable(name = "screen-id") id: UUID, - @RequestPart(name = "image") image: MultipartFile, - ): ScreenResponse = updateScreenUseCase.execute(id, image) - - /** - * 모든 화면 이미지 목록을 조회합니다. - * - * @return 화면 이미지 목록이 포함된 응답 객체 리스트 - */ - @GetMapping - override fun queryScreen(): List = queryScreenUseCase.execute() -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/QueryScreenResponse.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/QueryScreenResponse.kt deleted file mode 100644 index 10f0edf..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/QueryScreenResponse.kt +++ /dev/null @@ -1,20 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response - -import java.time.LocalDateTime -import java.util.UUID - -/** - * 화면 정보 조회 응답을 위한 데이터 클래스입니다. - * 화면의 상세 정보와 메타데이터를 클라이언트에 반환할 때 사용됩니다. - * - * @property id 화면 정보의 고유 식별자 (UUID) - * @property image 화면에 표시될 이미지의 URL 또는 경로 - * @property createAt 화면 정보가 생성된 일시 - * @property modifyAt 화면 정보가 마지막으로 수정된 일시 - */ -data class QueryScreenResponse( - val id: UUID, - val image: String, - val createAt: LocalDateTime, - val modifyAt: LocalDateTime, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/ScreenResponse.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/ScreenResponse.kt deleted file mode 100644 index d5c94fb..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/dto/response/ScreenResponse.kt +++ /dev/null @@ -1,11 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response - -/** - * 화면 정보 응답을 위한 데이터 클래스입니다. - * 클라이언트에게 반환되는 화면 관련 정보를 담고 있습니다. - * - * @property image 화면에 표시될 이미지의 URL 또는 경로 - */ -data class ScreenResponse( - val image: String, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/entity/ScreenJpaEntity.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/entity/ScreenJpaEntity.kt deleted file mode 100644 index fbca683..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/entity/ScreenJpaEntity.kt +++ /dev/null @@ -1,21 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.adatper.out.entity - -import hs.kr.entrydsm.feed.global.entity.BaseEntity -import jakarta.persistence.Column -import jakarta.persistence.Entity -import java.util.UUID - -/** - * 화면 정보를 데이터베이스에 저장하기 위한 JPA 엔티티 클래스입니다. - * - * @property image 화면에 표시될 이미지의 경로 또는 URL - * @property adminId 화면을 등록한 관리자 ID (UUID) - * @param id 엔티티의 고유 식별자 (생성 시 자동 생성됨) - */ -@Entity(name = "tbl_screen") -class ScreenJpaEntity( - id: UUID? = null, - var image: String, - @Column(columnDefinition = "BINARY(16)") - val adminId: UUID, -) : BaseEntity(id) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/mapper/ScreenMapper.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/mapper/ScreenMapper.kt deleted file mode 100644 index a5c59a4..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/mapper/ScreenMapper.kt +++ /dev/null @@ -1,28 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.adatper.out.mapper - -import hs.kr.entrydsm.feed.domain.screen.adatper.out.entity.ScreenJpaEntity -import hs.kr.entrydsm.feed.domain.screen.model.Screen -import org.mapstruct.Mapper - -/** - * 화면(Screen) 도메인 모델과 JPA 엔티티 간의 변환을 담당하는 매퍼 인터페이스입니다. - * MapStruct를 사용하여 구현체가 자동으로 생성됩니다. - */ -@Mapper(componentModel = "spring") -interface ScreenMapper { - /** - * Screen 도메인 모델을 JPA 엔티티로 변환합니다. - * - * @param model 변환할 Screen 도메인 모델 - * @return 변환된 ScreenJpaEntity 인스턴스 - */ - fun toEntity(model: Screen): ScreenJpaEntity - - /** - * JPA 엔티티를 Screen 도메인 모델로 변환합니다. - * - * @param entity 변환할 ScreenJpaEntity 인스턴스 - * @return 변환된 Screen 도메인 모델 - */ - fun toModel(entity: ScreenJpaEntity): Screen -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/ScreenPersistenceAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/ScreenPersistenceAdapter.kt deleted file mode 100644 index e102eef..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/ScreenPersistenceAdapter.kt +++ /dev/null @@ -1,51 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.adatper.out.persistence - -import hs.kr.entrydsm.feed.domain.screen.adatper.out.mapper.ScreenMapper -import hs.kr.entrydsm.feed.domain.screen.adatper.out.persistence.repository.ScreenRepository -import hs.kr.entrydsm.feed.domain.screen.application.port.out.ScreenPort -import hs.kr.entrydsm.feed.domain.screen.model.Screen -import org.springframework.data.repository.findByIdOrNull -import org.springframework.stereotype.Component -import java.util.UUID - -/** - * 화면 정보 도메인과 데이터베이스 간의 상호작용을 담당하는 어댑터 클래스입니다. - * - * @property screenRepository 화면 정보 엔티티를 데이터베이스에서 조작하기 위한 리포지토리 - * @property screenMapper 화면 정보 도메인 객체와 엔티티 간의 변환을 담당하는 매퍼 - */ -@Component -class ScreenPersistenceAdapter( - private val screenRepository: ScreenRepository, - private val screenMapper: ScreenMapper, -) : ScreenPort { - - /** - * 화면 정보를 데이터베이스에 저장합니다. - * - * @param screen 저장할 화면 정보 도메인 객체 - */ - override fun saveScreen(screen: Screen) { - screenRepository.save(screenMapper.toEntity(screen)) - } - - /** - * 데이터베이스에 저장된 모든 화면 정보를 조회합니다. - * - * @return 모든 화면 정보 도메인 객체 리스트 - */ - override fun findAll(): List { - return screenRepository.findAll().map { screenMapper.toModel(it) } - } - - /** - * 고유 식별자(ID)로 화면 정보를 조회합니다. - * - * @param screenId 조회할 화면의 고유 식별자 - * @return 조회된 화면 정보 도메인 객체. 존재하지 않으면 null을 반환합니다. - */ - override fun findByIdOrNull(screenId: UUID): Screen? = - screenRepository.findByIdOrNull(screenId)?.let { - screenMapper.toModel(it) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/repository/ScreenRepository.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/repository/ScreenRepository.kt deleted file mode 100644 index ffb8295..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/out/persistence/repository/ScreenRepository.kt +++ /dev/null @@ -1,11 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.adatper.out.persistence.repository - -import hs.kr.entrydsm.feed.domain.screen.adatper.out.entity.ScreenJpaEntity -import org.springframework.data.jpa.repository.JpaRepository -import java.util.UUID - -/** - * 화면(Screen) 데이터에 접근하기 위한 JPA Repository 인터페이스입니다. - * 화면 엔티티의 CRUD 작업을 위한 기본 메서드를 상속받아 사용합니다. - */ -interface ScreenRepository : JpaRepository diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/CreateScreenUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/CreateScreenUseCase.kt deleted file mode 100644 index 1fef0e0..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/CreateScreenUseCase.kt +++ /dev/null @@ -1,13 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.port.`in` - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenResponse -import org.springframework.web.multipart.MultipartFile - -/** - * 화면 생성을 위한 유스케이스 인터페이스입니다. - * 화면 도메인에서 새로운 화면 이미지를 업로드하고 생성하는 역할을 담당합니다. - */ -interface CreateScreenUseCase { - - suspend fun execute(file: MultipartFile): ScreenResponse -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/QueryScreenUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/QueryScreenUseCase.kt deleted file mode 100644 index eb33b07..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/QueryScreenUseCase.kt +++ /dev/null @@ -1,16 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.port.`in` - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.QueryScreenResponse - -/** - * 화면 목록 조회를 위한 유스케이스 인터페이스입니다. - * 화면 도메인에서 모든 화면 목록을 조회하는 역할을 담당합니다. - */ -interface QueryScreenUseCase { - /** - * 모든 화면 목록을 조회합니다. - * - * @return 화면 목록 응답 - */ - fun execute(): List -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/UpdateScreenUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/UpdateScreenUseCase.kt deleted file mode 100644 index f9a1c7c..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/in/UpdateScreenUseCase.kt +++ /dev/null @@ -1,23 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.port.`in` - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenResponse -import org.springframework.web.multipart.MultipartFile -import java.util.UUID - -/** - * 화면 업데이트를 위한 유스케이스 인터페이스입니다. - * 화면 도메인에서 기존 화면 이미지를 새로운 이미지로 업데이트하는 역할을 담당합니다. - */ -interface UpdateScreenUseCase { - /** - * 특정 화면 이미지를 업데이트합니다. - * - * @param screenId 업데이트할 화면의 고유 식별자 - * @param file 새로운 화면 이미지 파일 - * @return 화면 업데이트 응답 - */ - fun execute( - screenId: UUID, - file: MultipartFile, - ): ScreenResponse -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/SaveScreenPort.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/SaveScreenPort.kt deleted file mode 100644 index a7f1234..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/SaveScreenPort.kt +++ /dev/null @@ -1,16 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.port.out - -import hs.kr.entrydsm.feed.domain.screen.model.Screen - -/** - * 화면 저장을 위한 포트 인터페이스입니다. - * 화면 도메인 객체를 저장하거나 업데이트하는 메서드를 정의합니다. - */ -interface SaveScreenPort { - /** - * 화면을 저장하거나 업데이트합니다. - * - * @param screen 저장하거나 업데이트할 화면 도메인 객체 - */ - fun saveScreen(screen: Screen) -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/ScreenPort.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/ScreenPort.kt deleted file mode 100644 index bea76db..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/port/out/ScreenPort.kt +++ /dev/null @@ -1,9 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.port.out - -/** - * 화면 이미지 관련 모든 포트 인터페이스를 통합한 포트입니다. - * 화면 이미지 데이터의 CRUD 작업을 위한 모든 인터페이스를 상속받습니다. - */ -interface ScreenPort : - FindScreenPort, - SaveScreenPort diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/CreateScreenService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/CreateScreenService.kt deleted file mode 100644 index d30a412..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/CreateScreenService.kt +++ /dev/null @@ -1,39 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.service - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenResponse -import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.CreateScreenUseCase -import hs.kr.entrydsm.feed.domain.screen.application.port.out.SaveScreenPort -import hs.kr.entrydsm.feed.global.utils.admin.AdminUtils -import hs.kr.entrydsm.feed.infrastructure.s3.PathList -import hs.kr.entrydsm.feed.infrastructure.s3.util.FileUtil -import hs.kr.entrydsm.feed.domain.screen.model.Screen -import org.springframework.stereotype.Service -import org.springframework.web.multipart.MultipartFile - -/** - * 화면 이미지 생성을 처리하는 서비스 클래스입니다. - * - * @property saveScreenPort 화면 저장을 위한 포트 - * @property adminUtils 관리자 인증 유틸리티 - * @property fileUtil 파일 업로드 유틸리티 - */ -@Service -class CreateScreenService( - private val saveScreenPort: SaveScreenPort, - private val adminUtils: AdminUtils, - private val fileUtil: FileUtil, -) : CreateScreenUseCase { - - override suspend fun execute(file: MultipartFile): ScreenResponse { - val adminId = adminUtils.getCurrentAdmin().id - - val fileName = fileUtil.upload(file, PathList.SCREEN) - saveScreenPort.saveScreen( - Screen( - image = fileName, - adminId = adminId, - ), - ) - return ScreenResponse(fileName) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/QueryScreenService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/QueryScreenService.kt deleted file mode 100644 index 9570ecd..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/QueryScreenService.kt +++ /dev/null @@ -1,37 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.service - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.QueryScreenResponse -import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.QueryScreenUseCase -import hs.kr.entrydsm.feed.domain.screen.application.port.out.FindScreenPort -import hs.kr.entrydsm.feed.infrastructure.s3.PathList -import hs.kr.entrydsm.feed.infrastructure.s3.util.FileUtil -import org.springframework.stereotype.Service - -/** - * 화면 이미지 목록 조회를 처리하는 서비스 클래스입니다. - * - * @property findScreenPort 화면 조회를 위한 포트 - * @property fileUtil 파일 URL 생성을 위한 유틸리티 - */ -@Service -class QueryScreenService( - private val findScreenPort: FindScreenPort, - private val fileUtil: FileUtil, -) : QueryScreenUseCase { - /** - * 모든 화면 이미지 목록을 조회합니다. - * - * @return 화면 이미지 목록 (각 항목은 ID, URL, 생성일시, 수정일시 포함) - */ - override fun execute(): List { - return findScreenPort.findAll() - .map { it -> - QueryScreenResponse( - it.id!!, - fileUtil.generateObjectUrl(it.image, PathList.SCREEN), - it.createdAt, - it.modifiedAt, - ) - } - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/UpdateScreenService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/UpdateScreenService.kt deleted file mode 100644 index c92bead..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/application/service/UpdateScreenService.kt +++ /dev/null @@ -1,48 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.application.service - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenResponse -import hs.kr.entrydsm.feed.domain.screen.exception.ScreenNotFoundException -import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.UpdateScreenUseCase -import hs.kr.entrydsm.feed.domain.screen.application.port.out.FindScreenPort -import hs.kr.entrydsm.feed.infrastructure.s3.PathList -import hs.kr.entrydsm.feed.infrastructure.s3.util.FileUtil -import jakarta.transaction.Transactional -import org.springframework.stereotype.Service -import org.springframework.web.multipart.MultipartFile -import java.util.UUID - -/** - * 화면 이미지 업데이트를 처리하는 서비스 클래스입니다. - * - * @property fileUtil 파일 업로드 및 삭제를 위한 유틸리티 - * @property findScreenPort 화면 조회를 위한 포트 - */ -@Transactional -@Service -class UpdateScreenService( - private val fileUtil: FileUtil, - private val findScreenPort: FindScreenPort, -) : UpdateScreenUseCase { - /** - * 지정된 ID의 화면 이미지를 새로운 이미지로 업데이트합니다. - * 기존 이미지는 삭제됩니다. - * - * @param screenId 업데이트할 화면의 고유 식별자 - * @param file 새로운 이미지 파일 - * @return 업데이트된 화면 이미지의 URL이 포함된 응답 - * @throws ScreenNotFoundException 지정된 ID의 화면을 찾을 수 없는 경우 - */ - override fun execute( - screenId: UUID, - file: MultipartFile, - ): ScreenResponse { - val screen = - findScreenPort.findByIdOrNull(screenId) - ?: throw ScreenNotFoundException - val fileName = fileUtil.upload(file, PathList.SCREEN) - fileUtil.delete(screen.image, PathList.SCREEN) - screen.updateImage(fileName) - - return ScreenResponse(fileUtil.generateObjectUrl(fileName, PathList.SCREEN)) - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/exception/ScreenNotFoundException.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/exception/ScreenNotFoundException.kt deleted file mode 100644 index 93fd62b..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/exception/ScreenNotFoundException.kt +++ /dev/null @@ -1,14 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.exception - -import hs.kr.entrydsm.feed.global.error.exception.CasperException -import hs.kr.entrydsm.feed.global.error.exception.ErrorCode - -/** - * 화면 정보를 찾을 수 없을 때 발생하는 예외 클래스입니다. - * - * @property status HTTP 상태 코드 (404) - * @property message 에러 메시지 - */ -object ScreenNotFoundException : CasperException( - ErrorCode.SCREEN_NOT_FOUND, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/model/Screen.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/model/Screen.kt deleted file mode 100644 index 3d320a8..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/model/Screen.kt +++ /dev/null @@ -1,29 +0,0 @@ -package hs.kr.entrydsm.feed.domain.screen.model - -import java.time.LocalDateTime -import java.util.UUID - -/** - * 화면 정보를 나타내는 도메인 모델 클래스입니다. - * - * @property id 화면의 고유 식별자 (생성 시 자동 할당) - * @property image 화면 이미지 파일명 또는 경로 - * @property adminId 화면을 등록한 관리자 ID - * @property createdAt 화면 정보 생성 일시 (기본값: 현재 시간) - * @property modifiedAt 화면 정보 수정 일시 (기본값: 현재 시간) - */ -data class Screen( - val id: UUID? = null, - val image: String, - val adminId: UUID, - val createdAt: LocalDateTime = LocalDateTime.now(), - val modifiedAt: LocalDateTime = LocalDateTime.now(), -) { - /** - * 화면 이미지를 새로운 이미지로 업데이트합니다. - * - * @param newImage 새로운 화면 이미지 파일명 또는 경로 - * @return 이미지가 업데이트된 Screen 객체 - */ - fun updateImage(newImage: String): Screen =copy(image = newImage) -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/screen/ScreenApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/screen/ScreenApiDocument.kt deleted file mode 100644 index 4d19355..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/screen/ScreenApiDocument.kt +++ /dev/null @@ -1,102 +0,0 @@ -package hs.kr.entrydsm.feed.global.document.screen - -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.QueryScreenResponse -import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenResponse -import io.swagger.v3.oas.annotations.Operation -import io.swagger.v3.oas.annotations.media.Content -import io.swagger.v3.oas.annotations.responses.ApiResponse -import io.swagger.v3.oas.annotations.responses.ApiResponses -import io.swagger.v3.oas.annotations.tags.Tag -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.multipart.MultipartFile -import java.util.UUID - -/** - * Screen API 문서화를 위한 인터페이스입니다. - */ -@Tag(name = "Screen", description = "전형 요강 API") -interface ScreenApiDocument { - - @Operation( - summary = "전형 요강 이미지 업로드", - description = "전형 요강 이미지를 업로드합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "201", - description = "전형 요강 이미지 업로드 성공", - content = arrayOf(Content()) - ), - ApiResponse( - responseCode = "400", - description = "파일이 비어있습니다.", - content = arrayOf(Content()) - ), - ApiResponse( - responseCode = "400", - description = "허용되지 않은 확장자입니다.", - content = arrayOf(Content()) - ), - ) - /** - * 전형 요강 이미지를 새로 업로드합니다. - * - * @param image 업로드할 전형 요강 이미지 파일 - * @return 업로드된 이미지 정보 - */ - suspend fun createScreen( - @RequestPart(name = "image") image: MultipartFile, - ): ScreenResponse - - @Operation( - summary = "전형 요강 이미지 수정", - description = "전형 요강 이미지를 수정합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "201", - description = "전형 요강 이미지 수정 성공", - content = arrayOf(Content()) - ), - ApiResponse( - responseCode = "400", - description = "파일이 비어있습니다.", - content = arrayOf(Content()) - ), - ApiResponse( - responseCode = "400", - description = "허용되지 않은 확장자입니다.", - content = arrayOf(Content()) - ), - ) - /** - * 기존 전형 요강 이미지를 수정합니다. - * - * @param id 수정할 전형 요강의 ID - * @param image 새로 대체할 이미지 파일 - * @return 수정된 이미지 정보 - */ - fun updateScreen( - @PathVariable(name = "screen-id") id: UUID, - @RequestPart(name = "image") image: MultipartFile, - ): ScreenResponse - - @Operation( - summary = "전형 요강 이미지 조회", - description = "전형 요강 이미지를 조회합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "201", - description = "전형 요강 이미지 조회 성공", - content = arrayOf(Content()) - ) - ) - /** - * 모든 전형 요강 이미지 목록을 조회합니다. - * - * @return 전형 요강 이미지 목록 - */ - fun queryScreen(): List -} From 461c6ea87bc52d22a2217ece55b6722351e4a8fd Mon Sep 17 00:00:00 2001 From: coehgns Date: Wed, 15 Oct 2025 11:16:30 +0900 Subject: [PATCH 3/5] =?UTF-8?q?chore=20(=20#38=20)=20:=20reserve=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/in/web/ReserveWebAdapter.kt | 29 ----------------- .../application/port/in/GetReserveUseCase.kt | 14 -------- .../application/service/GetReserveService.kt | 25 --------------- .../document/reserve/ReserveApiDocument.kt | 32 ------------------- 4 files changed, 100 deletions(-) delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/port/in/GetReserveUseCase.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/service/GetReserveService.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/reserve/ReserveApiDocument.kt diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt deleted file mode 100644 index 38d8e04..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt +++ /dev/null @@ -1,29 +0,0 @@ -package hs.kr.entrydsm.feed.domain.reserve.adapter.`in`.web - -import hs.kr.entrydsm.feed.domain.reserve.application.port.`in`.GetReserveUseCase -import hs.kr.entrydsm.feed.global.document.reserve.ReserveApiDocument -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - -/** - * 예약 링크 관련 HTTP 요청을 처리하는 웹 어댑터 클래스입니다. - * - * 이 클래스는 예약 링크 조회와 관련된 HTTP 엔드포인트를 제공하며, - * 클라이언트의 요청을 적절한 서비스 메서드로 라우팅합니다. - * - * @property getReserveUseCase 예약 링크 비즈니스 로직을 처리하는 서비스 - */ -@RestController -@RequestMapping("/reserve") -class ReserveWebAdapter( - private val getReserveUseCase: GetReserveUseCase, -) : ReserveApiDocument { - /** - * 예약 페이지 링크를 조회합니다. - * - * @return 예약 페이지 URL 문자열 - */ - @GetMapping - override fun reserveLink(): String = getReserveUseCase.execute() -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/port/in/GetReserveUseCase.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/port/in/GetReserveUseCase.kt deleted file mode 100644 index bc8fd47..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/port/in/GetReserveUseCase.kt +++ /dev/null @@ -1,14 +0,0 @@ -package hs.kr.entrydsm.feed.domain.reserve.application.port.`in` - -/** - * 예약 관련 비즈니스 로직을 정의한 인터페이스입니다. - * 예약 링크 조회 기능을 제공합니다. - */ -interface GetReserveUseCase { - /** - * 예약 페이지 링크를 조회합니다. - * - * @return 예약 페이지 URL 문자열 - */ - fun execute(): String -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/service/GetReserveService.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/service/GetReserveService.kt deleted file mode 100644 index e4c1984..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/service/GetReserveService.kt +++ /dev/null @@ -1,25 +0,0 @@ -package hs.kr.entrydsm.feed.domain.reserve.application.service - -import hs.kr.entrydsm.feed.domain.reserve.application.port.`in`.GetReserveUseCase -import org.springframework.beans.factory.annotation.Value -import org.springframework.stereotype.Service - -/** - * 예약 링크를 제공하는 서비스 클래스입니다. - * - * 이 클래스는 애플리케이션 설정에서 예약 링크를 가져와 제공하는 역할을 합니다. - * - * @property reserveLink 애플리케이션 설정에서 주입받은 예약 링크 (reserve.link) - */ -@Service -class GetReserveService( - @Value("\${reserve.link}") - private val reserveLink: String, -) : GetReserveUseCase { - /** - * 애플리케이션 설정에 정의된 예약 링크를 반환합니다. - * - * @return 예약 페이지 URL 문자열 - */ - override fun execute() = reserveLink -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/reserve/ReserveApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/reserve/ReserveApiDocument.kt deleted file mode 100644 index 002602c..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/reserve/ReserveApiDocument.kt +++ /dev/null @@ -1,32 +0,0 @@ -package hs.kr.entrydsm.feed.global.document.reserve - -import io.swagger.v3.oas.annotations.Operation -import io.swagger.v3.oas.annotations.media.Content -import io.swagger.v3.oas.annotations.responses.ApiResponse -import io.swagger.v3.oas.annotations.responses.ApiResponses -import io.swagger.v3.oas.annotations.tags.Tag - -/** - * Reserve API 문서화를 위한 인터페이스입니다. - */ -@Tag(name = "Reserve", description = "예약 링크 API") -interface ReserveApiDocument { - - @Operation( - summary = "예약 페이지 링크 조회", - description = "예약 페이지 링크를 조회합니다." - ) - @ApiResponses( - ApiResponse( - responseCode = "200", - description = "예약 페이지 링크 조회 성공", - content = arrayOf(Content()) - ) - ) - /** - * 예약 페이지 링크를 조회합니다. - * - * @return 예약 페이지 링크 URL - */ - fun reserveLink(): String -} From 90404fc82ca542678bddf5708c581b1d79b4c3cf Mon Sep 17 00:00:00 2001 From: coehgns Date: Wed, 15 Oct 2025 11:17:12 +0900 Subject: [PATCH 4/5] =?UTF-8?q?chore=20(=20#38=20)=20:=20kafka=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feed/domain/reserve/adapter/out/.gitkeep | 0 .../reserve/application/port/out/.gitkeep | 0 .../configuration/KafkaConsumerConfig.kt | 90 ------------------- .../kafka/configuration/KafkaProperty.kt | 18 ---- .../kafka/configuration/KafkaTopics.kt | 17 ---- .../kafka/consumer/DeleteFaqTableConsumer.kt | 33 ------- 6 files changed, 158 deletions(-) delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/out/.gitkeep delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/port/out/.gitkeep delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaConsumerConfig.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaProperty.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaTopics.kt delete mode 100644 casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/consumer/DeleteFaqTableConsumer.kt diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/out/.gitkeep b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/out/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/port/out/.gitkeep b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/application/port/out/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaConsumerConfig.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaConsumerConfig.kt deleted file mode 100644 index ae8c3f4..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaConsumerConfig.kt +++ /dev/null @@ -1,90 +0,0 @@ -package hs.kr.entrydsm.feed.infrastructure.kafka.configuration - -import org.apache.kafka.clients.consumer.ConsumerConfig -import org.apache.kafka.common.serialization.StringDeserializer -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.kafka.annotation.EnableKafka -import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory -import org.springframework.kafka.core.ConsumerFactory -import org.springframework.kafka.core.DefaultKafkaConsumerFactory -import org.springframework.kafka.support.serializer.JsonDeserializer - -/** - * Kafka Consumer 설정을 담당하는 클래스입니다. - * Kafka Consumer의 기본 설정과 보안 설정을 구성합니다. - * - * @property kafkaProperty Kafka 관련 설정 프로퍼티 - */ -@EnableKafka -@Configuration -class KafkaConsumerConfig( - private val kafkaProperty: KafkaProperty, -) { - /** - * Kafka ConsumerFactory를 생성하는 빈을 정의합니다. - * - * @return ConsumerFactory Kafka Consumer 인스턴스를 생성하는 팩토리 - */ - @Bean - fun consumerFactory(): ConsumerFactory { - return DefaultKafkaConsumerFactory(consumerFactoryConfig()) - } - - /** - * Kafka Listener Container Factory를 생성하는 빈을 정의합니다. - * 동시성 및 컨테이너 속성을 설정합니다. - * - * @return ConcurrentKafkaListenerContainerFactory Kafka Listener Container 팩토리 - */ - @Bean - fun kafkaListenerContainerFactory(): ConcurrentKafkaListenerContainerFactory { - return ConcurrentKafkaListenerContainerFactory().apply { - consumerFactory = consumerFactory() - setConcurrency(2) - // Spring Kafka 3.1.x에서는 setMessageConverter 제거됨 - // JSON 변환은 JsonDeserializer에서 처리 - containerProperties.apply { - pollTimeout = 500 - isMissingTopicsFatal = false - isObservationEnabled = true - } - } - } - - /** - * Kafka ConsumerFactory에 사용할 설정을 생성합니다. - * - * @return Map Kafka Consumer 설정 맵 - */ - private fun consumerFactoryConfig(): Map { - return mapOf( - // 기본 설정 - ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG to kafkaProperty.serverAddress, - ConsumerConfig.ISOLATION_LEVEL_CONFIG to "read_committed", - ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG to StringDeserializer::class.java, - ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG to JsonDeserializer::class.java, - ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG to false, - ConsumerConfig.AUTO_OFFSET_RESET_CONFIG to "latest", - ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG to 5000, - ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG to 30000, - ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG to 10000, - // JsonDeserializer 설정 (3.1.x 방식) - JsonDeserializer.TRUSTED_PACKAGES to "*", - JsonDeserializer.TYPE_MAPPINGS to "", - JsonDeserializer.USE_TYPE_INFO_HEADERS to false, - JsonDeserializer.VALUE_DEFAULT_TYPE to "java.lang.Object", - ) - } - - /** - * Kafka 인증을 위한 JAAS 구성을 생성합니다. - * - * @return String JAAS 구성 문자열 - */ - private fun buildJaasConfig(): String { - return "org.apache.kafka.common.security.scram.ScramLoginModule required " + - "username=\"${kafkaProperty.confluentApiKey}\" " + - "password=\"${kafkaProperty.confluentApiSecret}\";" - } -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaProperty.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaProperty.kt deleted file mode 100644 index bd4a1c7..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaProperty.kt +++ /dev/null @@ -1,18 +0,0 @@ -package hs.kr.entrydsm.feed.infrastructure.kafka.configuration - -import org.springframework.boot.context.properties.ConfigurationProperties - -/** - * Kafka 관련 설정 프로퍼티를 담는 클래스입니다. - * application.yml에서 'kafka' 접두사로 시작하는 설정을 매핑합니다. - * - * @property serverAddress Kafka 브로커 서버 주소 - * @property confluentApiKey Confluent Cloud API 키 - * @property confluentApiSecret Confluent Cloud API 시크릿 - */ -@ConfigurationProperties("kafka") -class KafkaProperty( - val serverAddress: String, - val confluentApiKey: String, - val confluentApiSecret: String, -) diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaTopics.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaTopics.kt deleted file mode 100644 index 15ef7ea..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/configuration/KafkaTopics.kt +++ /dev/null @@ -1,17 +0,0 @@ -package hs.kr.entrydsm.feed.infrastructure.kafka.configuration - -/** - * Kafka 토픽 이름을 상수로 정의한 객체입니다. - * 애플리케이션 전체에서 일관된 토픽 이름을 사용하기 위해 상수로 관리합니다. - */ -object KafkaTopics { - /** - * 모든 테이블 데이터 삭제를 위한 토픽 이름 - */ - const val DELETE_ALL_TABLE = "delete-all-table" - - /** - * 사용자 삭제 이벤트를 위한 토픽 이름 - */ - const val DELETE_USER = "delete-user" -} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/consumer/DeleteFaqTableConsumer.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/consumer/DeleteFaqTableConsumer.kt deleted file mode 100644 index 55c7ace..0000000 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/infrastructure/kafka/consumer/DeleteFaqTableConsumer.kt +++ /dev/null @@ -1,33 +0,0 @@ -package hs.kr.entrydsm.feed.infrastructure.kafka.consumer - -import hs.kr.entrydsm.feed.domain.faq.adapter.out.persistence.repository.FaqRepository -import hs.kr.entrydsm.feed.infrastructure.kafka.configuration.KafkaTopics -import org.springframework.kafka.annotation.KafkaListener -import org.springframework.stereotype.Service -import org.springframework.transaction.annotation.Transactional - -/** - * FAQ 테이블 삭제를 처리하는 Kafka Consumer 클래스입니다. - * - * @property faqRepository FAQ 데이터 접근을 위한 리포지토리 - */ -@Service -class DeleteFaqTableConsumer( - private val faqRepository: FaqRepository, -) { - /** - * Kafka 토픽에서 메시지를 수신하여 FAQ 테이블의 모든 데이터를 삭제합니다. - * DELETE_ALL_TABLE 토픽으로 메시지가 수신되면 실행됩니다. - * - * @see KafkaTopics.DELETE_ALL_TABLE - */ - @KafkaListener( - topics = [KafkaTopics.DELETE_ALL_TABLE], - groupId = "delete-all-table-faq", - containerFactory = "kafkaListenerContainerFactory", - ) - @Transactional - fun execute() { - faqRepository.deleteAll() - } -} From af9c3666549d03c3ea2d7acb21d5a839efc32991 Mon Sep 17 00:00:00 2001 From: coehgns Date: Wed, 15 Oct 2025 11:17:25 +0900 Subject: [PATCH 5/5] =?UTF-8?q?chore=20(=20#38=20)=20:=20kafka=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildSrc/src/main/kotlin/Dependencies.kt | 3 --- buildSrc/src/main/kotlin/DependencyVersion.kt | 2 -- casper-feed/build.gradle.kts | 3 --- 3 files changed, 8 deletions(-) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 9869413..04ef9c2 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -53,9 +53,6 @@ object Dependencies { // open feign const val OPEN_FEIGN = "org.springframework.cloud:spring-cloud-starter-openfeign:${DependencyVersion.OPEN_FEIGN_VERSION}" - // Kafka - const val KAFKA = "org.springframework.kafka:spring-kafka:${DependencyVersion.KAFKA_VERSION}" - // Spring Cloud Config const val SPRING_CLOUD_CONFIG = "org.springframework.cloud:spring-cloud-starter-config" diff --git a/buildSrc/src/main/kotlin/DependencyVersion.kt b/buildSrc/src/main/kotlin/DependencyVersion.kt index 36e1c05..c7744f8 100644 --- a/buildSrc/src/main/kotlin/DependencyVersion.kt +++ b/buildSrc/src/main/kotlin/DependencyVersion.kt @@ -16,8 +16,6 @@ object DependencyVersion { const val GRPC_CLIENT = "3.1.0.RELEASE" const val GOOGLE_PROTOBUF = "3.25.3" - const val KAFKA_VERSION = "3.1.2" - const val SWAGGER_VERSION = "2.8.13" const val AWS = "1.12.281" diff --git a/casper-feed/build.gradle.kts b/casper-feed/build.gradle.kts index 4deab0b..c733429 100644 --- a/casper-feed/build.gradle.kts +++ b/casper-feed/build.gradle.kts @@ -93,9 +93,6 @@ dependencies { // feign implementation(Dependencies.OPEN_FEIGN) - // Kafka - implementation(Dependencies.KAFKA) - // Cloud Config implementation(Dependencies.SPRING_CLOUD_CONFIG)