Skip to content

Commit

Permalink
merge: v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaisqls committed Apr 12, 2023
2 parents 85049e1 + 33bbc61 commit 320bca0
Show file tree
Hide file tree
Showing 718 changed files with 774 additions and 691 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,5 @@ jobs:
--build-cache
--no-daemon
- name: Run Detekt Application
run: ./gradlew :dms-application:detekt

- name: Run Detekt Domain
run: ./gradlew :dms-domain:detekt
run: ./gradlew :dms-core:detekt
10 changes: 7 additions & 3 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ object Dependencies {
// validation
const val SPRING_VALIDATION = "org.springframework.boot:spring-boot-starter-validation"

// thymeleaf
const val SPRING_THYMELEAF = "org.springframework.boot:spring-boot-starter-thymeleaf"

// transaction
Expand All @@ -24,9 +25,9 @@ object Dependencies {
const val CONFIGURATION_PROCESSOR = "org.springframework.boot:spring-boot-configuration-processor"

// database
const val SPRING_DATA_JPA = "org.springframework.boot:spring-boot-starter-data-jpa"
const val MYSQL_CONNECTOR = "mysql:mysql-connector-java"
const val SPRING_REDIS = "org.springframework.boot:spring-boot-starter-data-redis"
const val SPRING_DATA_JPA = "org.springframework.boot:spring-boot-starter-data-jpa:${PluginVersions.SPRING_BOOT_VERSION}"
const val MYSQL_CONNECTOR = "mysql:mysql-connector-java:${DependencyVersions.MYSQL}"
const val SPRING_REDIS = "org.springframework.boot:spring-boot-starter-data-redis:${PluginVersions.SPRING_BOOT_VERSION}"
const val REDIS = "org.springframework.data:spring-data-redis:${DependencyVersions.REDIS_VERSION}"

// querydsl
Expand Down Expand Up @@ -65,4 +66,7 @@ object Dependencies {

// gson
const val GSON = "com.google.code.gson:gson"

// sentry
const val SENTRY = "io.sentry:sentry-spring-boot-starter:${DependencyVersions.SENTRY_VERSION}"
}
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/DependencyVersions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ object DependencyVersions {
const val UUID_TIME_VERSION = "3.1.4"
const val SPRING_TRANSACTION = "5.3.22"
const val QUERYDSL = "5.0.0"
const val MYSQL = "8.0.28"
const val APACHE_POI_VERSION = "3.7"
const val MOCKK_VERSION = "1.13.2"
const val OPEN_FEIGN_VERSION = "3.1.4"
const val SENTRY_VERSION = "6.2.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ plugins {
}

dependencies {
// impl project
implementation(project(":dms-domain"))

// transaction
implementation(Dependencies.SPRING_TRANSACTION)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ interface ErrorProperty {
fun status(): Int

fun message(): String

fun code(): String
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object AuthCodeLimitNotFoundException : DmsException(
AuthErrorCode.AUTH_CODE_LIMIT_NOT_FOUND
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object AuthCodeMismatchException : DmsException(
AuthErrorCode.AUTH_CODE_MISMATCH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object AuthCodeNotFoundException : DmsException(
AuthErrorCode.AUTH_CODE_NOT_FOUND
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object AuthCodeOverLimitException : DmsException(
AuthErrorCode.AUTH_CODE_OVER_LIMITED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object EmailAlreadyCertifiedException : DmsException(
AuthErrorCode.EMAIL_ALREADY_CERTIFIED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object EmailMismatchException : DmsException(
AuthErrorCode.EMAIL_MISMATCH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object PasswordMismatchException : DmsException(
AuthErrorCode.PASSWORD_MISMATCH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object RefreshTokenNotFoundException : DmsException(
AuthErrorCode.REFRESH_TOKEN_NOT_FOUND
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.auth.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.auth.error.AuthErrorCode
import team.aliens.dms.domain.auth.exception.error.AuthErrorCode

object UnverifiedAuthCodeException : DmsException(
AuthErrorCode.UNVERIFIED_AUTH_CODE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
package team.aliens.dms.domain.auth.error
package team.aliens.dms.domain.auth.exception.error

import team.aliens.dms.common.error.ErrorProperty
import team.aliens.dms.common.error.ErrorStatus

enum class AuthErrorCode(
private val status: Int,
private val message: String
private val message: String,
private val sequence: Int
) : ErrorProperty {

AUTH_CODE_MISMATCH(ErrorStatus.UNAUTHORIZED, "Auth Code Mismatch"),
EMAIL_MISMATCH(ErrorStatus.UNAUTHORIZED, "Email Mismatch"),
PASSWORD_MISMATCH(ErrorStatus.UNAUTHORIZED, "Password Mismatch"),
UNVERIFIED_AUTH_CODE(ErrorStatus.UNAUTHORIZED, "Unverified Auth Code"),
AUTH_CODE_MISMATCH(ErrorStatus.UNAUTHORIZED, "Auth Code Mismatch", 1),
EMAIL_MISMATCH(ErrorStatus.UNAUTHORIZED, "Email Mismatch", 2),
PASSWORD_MISMATCH(ErrorStatus.UNAUTHORIZED, "Password Mismatch", 3),
UNVERIFIED_AUTH_CODE(ErrorStatus.UNAUTHORIZED, "Unverified Auth Code", 4),

REFRESH_TOKEN_NOT_FOUND(ErrorStatus.NOT_FOUND, "Refresh Token Not Found"),
AUTH_CODE_NOT_FOUND(ErrorStatus.NOT_FOUND, "Auth Code Not Found"),
AUTH_CODE_LIMIT_NOT_FOUND(ErrorStatus.NOT_FOUND, "Auth Code Limit Not Found"),
REFRESH_TOKEN_NOT_FOUND(ErrorStatus.NOT_FOUND, "Refresh Token Not Found", 1),
AUTH_CODE_NOT_FOUND(ErrorStatus.NOT_FOUND, "Auth Code Not Found", 2),
AUTH_CODE_LIMIT_NOT_FOUND(ErrorStatus.NOT_FOUND, "Auth Code Limit Not Found", 3),

EMAIL_ALREADY_CERTIFIED(ErrorStatus.CONFLICT, "Email Already Certified"),
EMAIL_ALREADY_CERTIFIED(ErrorStatus.CONFLICT, "Email Already Certified", 1),

AUTH_CODE_OVER_LIMITED(ErrorStatus.TOO_MANY_REQUEST, "Auth Code Over Limited")
AUTH_CODE_OVER_LIMITED(ErrorStatus.TOO_MANY_REQUEST, "Auth Code Over Limited", 1)
;

override fun status(): Int = status
override fun message(): String = message
override fun code(): String = "AUTH-$status-$sequence"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package team.aliens.dms.domain.auth.spi

import team.aliens.dms.domain.auth.model.RefreshToken

interface CommandRefreshTokenPort {
fun save(refreshToken: RefreshToken): RefreshToken
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package team.aliens.dms.domain.auth.spi

interface RefreshTokenPort :
QueryRefreshTokenPort
QueryRefreshTokenPort,
CommandRefreshTokenPort
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.file.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.file.error.FileErrorCode
import team.aliens.dms.domain.file.exception.error.FileErrorCode

object BadExcelFormatException : DmsException(
FileErrorCode.BAD_EXCEL_FORMAT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.file.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.file.error.FileErrorCode
import team.aliens.dms.domain.file.exception.error.FileErrorCode

object FileIOInterruptedException : DmsException(
FileErrorCode.IO_INTERRUPTED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.file.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.file.error.FileErrorCode
import team.aliens.dms.domain.file.exception.error.FileErrorCode

object FileInvalidExtensionException : DmsException(
FileErrorCode.INVALID_EXTENSION
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
package team.aliens.dms.domain.file.error
package team.aliens.dms.domain.file.exception.error

import team.aliens.dms.common.error.ErrorProperty
import team.aliens.dms.common.error.ErrorStatus

enum class FileErrorCode(
private val status: Int,
private val message: String
private val message: String,
private val sequence: Int
) : ErrorProperty {

INVALID_EXTENSION(ErrorStatus.BAD_REQUEST, "Allowed Extension : jpg(JPG), jpeg(JPEG), png(PNG), heic(HEIC)"),
BAD_EXCEL_FORMAT(ErrorStatus.BAD_REQUEST, "Bad Excel Format"),
IO_INTERRUPTED(ErrorStatus.INTERNAL_SERVER_ERROR, "Interrupted File IO")
INVALID_EXTENSION(ErrorStatus.BAD_REQUEST, "Allowed Extension : jpg(JPG), jpeg(JPEG), png(PNG), heic(HEIC)", 1),
BAD_EXCEL_FORMAT(ErrorStatus.BAD_REQUEST, "Bad Excel Format", 2),
IO_INTERRUPTED(ErrorStatus.INTERNAL_SERVER_ERROR, "Interrupted File IO", 1)
;

override fun status(): Int = status
override fun message(): String = message
override fun code(): String = "FILE-$status-$sequence"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package team.aliens.dms.domain.file.spi

import java.io.File
import team.aliens.dms.domain.point.model.PointHistory
import team.aliens.dms.domain.remain.dto.StudentRemainInfo
import team.aliens.dms.domain.studyroom.model.TimeSlot
import team.aliens.dms.domain.studyroom.spi.vo.StudentSeatInfo
import java.io.File

interface WriteFilePort {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.manager.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.manager.error.ManagerErrorCode
import team.aliens.dms.domain.manager.exception.error.ManagerErrorCode

object ManagerInfoMismatchException : DmsException(
ManagerErrorCode.MANAGER_INFO_NOT_MATCHED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.manager.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.manager.error.ManagerErrorCode
import team.aliens.dms.domain.manager.exception.error.ManagerErrorCode

object ManagerNotFoundException : DmsException(
ManagerErrorCode.MANAGER_NOT_FOUND
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
package team.aliens.dms.domain.manager.error
package team.aliens.dms.domain.manager.exception.error

import team.aliens.dms.common.error.ErrorProperty
import team.aliens.dms.common.error.ErrorStatus

enum class ManagerErrorCode(
private val status: Int,
private val message: String
private val message: String,
private val sequence: Int
) : ErrorProperty {

MANAGER_INFO_NOT_MATCHED(ErrorStatus.UNAUTHORIZED, "Manager Info Not Matched"),
MANAGER_INFO_NOT_MATCHED(ErrorStatus.UNAUTHORIZED, "Manager Info Not Matched", 1),

MANAGER_NOT_FOUND(ErrorStatus.NOT_FOUND, "Manager Not Found")
MANAGER_NOT_FOUND(ErrorStatus.NOT_FOUND, "Manager Not Found", 1)
;

override fun status(): Int = status
override fun message(): String = message
override fun code(): String = "MANAGER-$status-$sequence"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ import java.util.UUID
interface QueryManagerPort {

fun queryManagerById(managerId: UUID): Manager?

fun existsManagerById(managerId: UUID): Boolean
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.notice.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.notice.error.NoticeErrorCode
import team.aliens.dms.domain.notice.exception.error.NoticeErrorCode

object IsNotWriterException : DmsException(
NoticeErrorCode.IS_NOT_WRITER
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.notice.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.notice.error.NoticeErrorCode
import team.aliens.dms.domain.notice.exception.error.NoticeErrorCode

object NoticeNotFoundException : DmsException(
NoticeErrorCode.NOTICE_NOT_FOUND
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
package team.aliens.dms.domain.notice.error
package team.aliens.dms.domain.notice.exception.error

import team.aliens.dms.common.error.ErrorProperty
import team.aliens.dms.common.error.ErrorStatus

enum class NoticeErrorCode(
private val status: Int,
private val message: String
private val message: String,
private val sequence: Int
) : ErrorProperty {

IS_NOT_WRITER(ErrorStatus.UNAUTHORIZED, "Only Writer Can Delete"),
IS_NOT_WRITER(ErrorStatus.UNAUTHORIZED, "Only Writer Can Delete", 1),

NOTICE_NOT_FOUND(ErrorStatus.NOT_FOUND, "Notice Not Found")
NOTICE_NOT_FOUND(ErrorStatus.NOT_FOUND, "Notice Not Found", 1)
;

override fun status(): Int = status
override fun message(): String = message
override fun code(): String = "NOTICE-$status-$sequence"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package team.aliens.dms.domain.notice.usecase

import java.util.UUID
import team.aliens.dms.common.annotation.ReadOnlyUseCase
import team.aliens.dms.domain.manager.exception.ManagerNotFoundException
import team.aliens.dms.domain.notice.dto.QueryNoticeDetailsResponse
Expand All @@ -10,6 +9,7 @@ import team.aliens.dms.domain.notice.spi.NoticeSecurityPort
import team.aliens.dms.domain.notice.spi.QueryNoticePort
import team.aliens.dms.domain.school.validateSameSchool
import team.aliens.dms.domain.user.exception.UserNotFoundException
import java.util.UUID

@ReadOnlyUseCase
class QueryNoticeDetailsUseCase(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.point.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.point.error.PointHistoryErrorCode
import team.aliens.dms.domain.point.exception.error.PointHistoryErrorCode

object InvalidPointFilterRangeException : DmsException(
PointHistoryErrorCode.INVALID_POINT_FILTER_RANGE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.domain.point.exception

import team.aliens.dms.common.error.DmsException
import team.aliens.dms.domain.point.error.PointHistoryErrorCode
import team.aliens.dms.domain.point.exception.error.PointHistoryErrorCode

object PointHistoryCanNotCancelException : DmsException(
PointHistoryErrorCode.POINT_HISTORY_CAN_NOT_CANCEL
Expand Down
Loading

0 comments on commit 320bca0

Please sign in to comment.