Skip to content

Commit

Permalink
[Refactor]: 패키지 feature 구조로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
bayy1216 committed Aug 29, 2024
1 parent e7b67e8 commit 016051f
Show file tree
Hide file tree
Showing 116 changed files with 451 additions and 440 deletions.
36 changes: 18 additions & 18 deletions src/main/kotlin/com/reditus/novelcia/FakeDataConfig.kt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package com.reditus.novelcia

import com.reditus.novelcia.domain.common.LoginUserId
import com.reditus.novelcia.domain.auth.AuthService
import com.reditus.novelcia.domain.episode.EpisodeCommand
import com.reditus.novelcia.domain.episode.application.EpisodeQueryService
import com.reditus.novelcia.domain.episode.application.EpisodeService
import com.reditus.novelcia.domain.novel.Novel
import com.reditus.novelcia.domain.novel.NovelCommand
import com.reditus.novelcia.domain.novel.ReadAuthority
import com.reditus.novelcia.domain.novel.Tag
import com.reditus.novelcia.domain.novel.application.NovelFavoriteService
import com.reditus.novelcia.domain.novel.application.NovelService
import com.reditus.novelcia.domain.user.User
import com.reditus.novelcia.domain.user.UserCommand
import com.reditus.novelcia.infrastructure.episode.EpisodeRepository
import com.reditus.novelcia.infrastructure.findByIdOrThrow
import com.reditus.novelcia.infrastructure.novel.NovelRepository
import com.reditus.novelcia.infrastructure.novel.TagRepository
import com.reditus.novelcia.infrastructure.user.UserRepository
import com.reditus.novelcia.common.domain.LoginUserId
import com.reditus.novelcia.auth.domain.AuthService
import com.reditus.novelcia.episode.domain.EpisodeCommand
import com.reditus.novelcia.episode.domain.application.EpisodeQueryService
import com.reditus.novelcia.episode.domain.application.EpisodeService
import com.reditus.novelcia.novel.domain.Novel
import com.reditus.novelcia.novel.domain.NovelCommand
import com.reditus.novelcia.novel.domain.ReadAuthority
import com.reditus.novelcia.novel.domain.Tag
import com.reditus.novelcia.novel.domain.application.NovelFavoriteService
import com.reditus.novelcia.novel.domain.application.NovelService
import com.reditus.novelcia.user.domain.User
import com.reditus.novelcia.user.domain.UserCommand
import com.reditus.novelcia.episode.infrastructure.EpisodeRepository
import com.reditus.novelcia.common.infrastructure.findByIdOrThrow
import com.reditus.novelcia.novel.infrastructure.NovelRepository
import com.reditus.novelcia.novel.infrastructure.TagRepository
import com.reditus.novelcia.user.infrastructure.UserRepository
import org.springframework.boot.CommandLineRunner
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.reditus.novelcia.domain.auth
package com.reditus.novelcia.auth.domain

import com.reditus.novelcia.domain.user.User
import com.reditus.novelcia.domain.user.UserCommand
import com.reditus.novelcia.domain.user.UserModel
import com.reditus.novelcia.domain.user.port.UserReader
import com.reditus.novelcia.domain.user.port.UserWriter
import com.reditus.novelcia.user.domain.User
import com.reditus.novelcia.user.domain.UserCommand
import com.reditus.novelcia.user.domain.UserModel
import com.reditus.novelcia.user.domain.port.UserReader
import com.reditus.novelcia.user.domain.port.UserWriter
import com.reditus.novelcia.global.exception.ElementConflictException
import com.reditus.novelcia.global.util.readOnly
import com.reditus.novelcia.global.util.transactional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.reditus.novelcia.interfaces.auth
package com.reditus.novelcia.auth.interfaces

import com.reditus.novelcia.domain.auth.AuthService
import com.reditus.novelcia.domain.user.UserModel
import com.reditus.novelcia.auth.domain.AuthService
import com.reditus.novelcia.user.domain.UserModel
import com.reditus.novelcia.global.security.setLoginUserDetails
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpSession
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reditus.novelcia.interfaces.auth
package com.reditus.novelcia.auth.interfaces

import com.reditus.novelcia.domain.user.UserCommand
import com.reditus.novelcia.user.domain.UserCommand
import io.swagger.v3.oas.annotations.media.Schema

class AuthReq {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

import com.querydsl.jpa.impl.JPAQueryFactory
import jakarta.persistence.EntityManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

import jakarta.persistence.Column
import jakarta.persistence.EntityListeners
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

class CursorRequest(
val cursorId: Long? = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

import jakarta.persistence.Entity
import jakarta.persistence.Id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

interface IdempotencyEventStore {
fun save(idempotencyKey: String)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

/**
* 유효성 검사를 통과한 사용자 ID를 나타내는 값 클래스
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

class OffsetRequest(
val page: Int = 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

class OffsetResponse<T>(
val data: List<T>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

/**
* 유효성 검사를 통과한 양수를 나타내는 값 클래스
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

/**
* Upsert 결과를 클라이언트에게 반환하기 위한 DTO 클래스
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

interface WriteBackManager<T> {
val flushSize: Int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.common
package com.reditus.novelcia.common.domain

import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Component
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.reditus.novelcia.infrastructure
package com.reditus.novelcia.common.infrastructure

import com.reditus.novelcia.domain.common.IdempotencyEvent
import com.reditus.novelcia.domain.common.IdempotencyEventStore
import com.reditus.novelcia.common.domain.IdempotencyEvent
import com.reditus.novelcia.common.domain.IdempotencyEventStore
import jakarta.persistence.EntityManager
import org.springframework.stereotype.Repository

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.infrastructure
package com.reditus.novelcia.common.infrastructure

import org.springframework.data.repository.CrudRepository
import org.springframework.data.repository.findByIdOrNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.interfaces
package com.reditus.novelcia.common.interfaces

import org.springframework.core.env.Environment
import org.springframework.web.bind.annotation.GetMapping
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.reditus.novelcia.domain.episode
package com.reditus.novelcia.episode.domain


import com.reditus.novelcia.domain.common.BaseModifiableEntity
import com.reditus.novelcia.domain.novel.Novel
import com.reditus.novelcia.domain.novel.ReadAuthority
import com.reditus.novelcia.domain.user.User
import com.reditus.novelcia.common.domain.BaseModifiableEntity
import com.reditus.novelcia.novel.domain.Novel
import com.reditus.novelcia.novel.domain.ReadAuthority
import com.reditus.novelcia.user.domain.User
import jakarta.persistence.*

@Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.reditus.novelcia.domain.episode
package com.reditus.novelcia.episode.domain


import com.reditus.novelcia.domain.common.BaseModifiableEntity
import com.reditus.novelcia.domain.user.User
import com.reditus.novelcia.common.domain.BaseModifiableEntity
import com.reditus.novelcia.user.domain.User
import jakarta.persistence.*

@Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.reditus.novelcia.domain.episode
package com.reditus.novelcia.episode.domain


import com.reditus.novelcia.domain.common.BaseTimeEntity
import com.reditus.novelcia.domain.user.User
import com.reditus.novelcia.common.domain.BaseTimeEntity
import com.reditus.novelcia.user.domain.User
import jakarta.persistence.*

@Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reditus.novelcia.domain.episode
package com.reditus.novelcia.episode.domain

import java.time.LocalDateTime

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.reditus.novelcia.domain.episode
package com.reditus.novelcia.episode.domain

import com.reditus.novelcia.domain.common.BaseTimeEntity
import com.reditus.novelcia.domain.novel.Novel
import com.reditus.novelcia.domain.user.User
import com.reditus.novelcia.common.domain.BaseTimeEntity
import com.reditus.novelcia.novel.domain.Novel
import com.reditus.novelcia.user.domain.User
import jakarta.persistence.*

@Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.reditus.novelcia.domain.episode.application
package com.reditus.novelcia.episode.domain.application

import com.reditus.novelcia.domain.episode.Episode
import com.reditus.novelcia.domain.novel.ReadAuthority
import com.reditus.novelcia.episode.domain.Episode
import com.reditus.novelcia.novel.domain.ReadAuthority
import com.reditus.novelcia.global.util.TxScope
import java.time.LocalDateTime

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.reditus.novelcia.domain.episode.application
package com.reditus.novelcia.episode.domain.application

import com.reditus.novelcia.domain.common.LoginUserId
import com.reditus.novelcia.domain.episode.EpisodeLike
import com.reditus.novelcia.domain.episode.EpisodeReadEvent
import com.reditus.novelcia.domain.episode.port.EpisodeLikeReader
import com.reditus.novelcia.domain.episode.port.EpisodePagingSort
import com.reditus.novelcia.domain.episode.port.EpisodeReadEventProducer
import com.reditus.novelcia.domain.episode.port.EpisodeReader
import com.reditus.novelcia.domain.novel.NovelFavorite
import com.reditus.novelcia.domain.novel.port.NovelFavoriteReader
import com.reditus.novelcia.domain.user.port.UserReader
import com.reditus.novelcia.common.domain.LoginUserId
import com.reditus.novelcia.episode.domain.EpisodeLike
import com.reditus.novelcia.episode.domain.EpisodeReadEvent
import com.reditus.novelcia.episode.domain.port.EpisodeLikeReader
import com.reditus.novelcia.episode.domain.port.EpisodePagingSort
import com.reditus.novelcia.episode.domain.port.EpisodeReadEventProducer
import com.reditus.novelcia.episode.domain.port.EpisodeReader
import com.reditus.novelcia.novel.domain.NovelFavorite
import com.reditus.novelcia.novel.domain.port.NovelFavoriteReader
import com.reditus.novelcia.user.domain.port.UserReader
import com.reditus.novelcia.global.util.readOnly
import org.springframework.data.domain.PageRequest
import org.springframework.stereotype.Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.reditus.novelcia.domain.episode.application
package com.reditus.novelcia.episode.domain.application

import com.reditus.novelcia.domain.common.LoginUserId
import com.reditus.novelcia.domain.episode.Episode
import com.reditus.novelcia.domain.episode.EpisodeCommand
import com.reditus.novelcia.domain.episode.EpisodeLike
import com.reditus.novelcia.domain.episode.port.EpisodeLikeWriter
import com.reditus.novelcia.domain.episode.port.EpisodeReader
import com.reditus.novelcia.domain.episode.port.EpisodeWriter
import com.reditus.novelcia.domain.novel.port.NovelReader
import com.reditus.novelcia.domain.user.port.UserReader
import com.reditus.novelcia.common.domain.LoginUserId
import com.reditus.novelcia.episode.domain.Episode
import com.reditus.novelcia.episode.domain.EpisodeCommand
import com.reditus.novelcia.episode.domain.EpisodeLike
import com.reditus.novelcia.episode.domain.port.EpisodeLikeWriter
import com.reditus.novelcia.episode.domain.port.EpisodeReader
import com.reditus.novelcia.episode.domain.port.EpisodeWriter
import com.reditus.novelcia.novel.domain.port.NovelReader
import com.reditus.novelcia.user.domain.port.UserReader
import com.reditus.novelcia.global.exception.NoPermissionException
import com.reditus.novelcia.global.util.transactional
import org.springframework.stereotype.Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reditus.novelcia.domain.episode.port
package com.reditus.novelcia.episode.domain.port

import com.reditus.novelcia.domain.episode.EpisodeComment
import com.reditus.novelcia.episode.domain.EpisodeComment
import java.time.LocalDate

interface EpisodeCommentReader {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reditus.novelcia.domain.episode.port
package com.reditus.novelcia.episode.domain.port

import com.reditus.novelcia.domain.episode.EpisodeLike
import com.reditus.novelcia.episode.domain.EpisodeLike
import java.time.LocalDate

interface EpisodeLikeReader {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reditus.novelcia.domain.episode.port
package com.reditus.novelcia.episode.domain.port

import com.reditus.novelcia.domain.episode.EpisodeLike
import com.reditus.novelcia.episode.domain.EpisodeLike

interface EpisodeLikeWriter {
fun save(episodeLike: EpisodeLike): EpisodeLike
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.reditus.novelcia.episode.domain.port

import com.reditus.novelcia.episode.domain.EpisodeReadEvent


interface EpisodeReadEventProducer{
fun publish(event: EpisodeReadEvent)
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.reditus.novelcia.domain.episode.port
package com.reditus.novelcia.episode.domain.port

import com.reditus.novelcia.domain.episode.Episode
import com.reditus.novelcia.domain.episode.application.EpisodeModel
import com.reditus.novelcia.episode.domain.Episode
import com.reditus.novelcia.episode.domain.application.EpisodeModel
import org.springframework.data.domain.PageRequest
import java.time.LocalDate

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reditus.novelcia.domain.episode.port
package com.reditus.novelcia.episode.domain.port

import com.reditus.novelcia.domain.episode.EpisodeView
import com.reditus.novelcia.episode.domain.EpisodeView
import java.time.LocalDate

interface EpisodeViewReader {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reditus.novelcia.domain.episode.port
package com.reditus.novelcia.episode.domain.port

import com.reditus.novelcia.domain.episode.Episode
import com.reditus.novelcia.episode.domain.Episode

interface EpisodeWriter {
fun save(episode: Episode) : Episode
Expand Down
Loading

0 comments on commit 016051f

Please sign in to comment.