From a809c33aa8f85cbe5280971529cb5576f5479dd7 Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Thu, 25 Apr 2024 08:54:08 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20(#614)=20outingService=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team/aliens/dms/domain/school/dto/SchoolResponse.kt | 3 ++- .../team/aliens/dms/domain/school/model/AvailableFeature.kt | 4 +++- .../domain/school/usecase/QueryAvailableFeaturesUseCase.kt | 3 ++- .../persistence/school/entity/AvailableFeatureJpaEntity.kt | 5 ++++- .../dms/persistence/school/mapper/AvailableFeatureMapper.kt | 6 ++++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/school/dto/SchoolResponse.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/school/dto/SchoolResponse.kt index 3cb7ca134..9373c1bfa 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/school/dto/SchoolResponse.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/school/dto/SchoolResponse.kt @@ -30,7 +30,8 @@ data class AvailableFeaturesResponse( val noticeService: Boolean, val pointService: Boolean, val studyRoomService: Boolean, - val remainService: Boolean + val remainService: Boolean, + val outingService: Boolean ) data class NeisSchoolResponse( diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/school/model/AvailableFeature.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/school/model/AvailableFeature.kt index 45e5da87b..0e7971a8b 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/school/model/AvailableFeature.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/school/model/AvailableFeature.kt @@ -16,6 +16,8 @@ data class AvailableFeature( val studyRoomService: Boolean, - val remainService: Boolean + val remainService: Boolean, + + val outingService: Boolean ) diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/school/usecase/QueryAvailableFeaturesUseCase.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/school/usecase/QueryAvailableFeaturesUseCase.kt index cefc2ba7c..d2ee93684 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/school/usecase/QueryAvailableFeaturesUseCase.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/school/usecase/QueryAvailableFeaturesUseCase.kt @@ -20,7 +20,8 @@ class QueryAvailableFeaturesUseCase( noticeService = availableFeatures.noticeService, pointService = availableFeatures.pointService, studyRoomService = availableFeatures.studyRoomService, - remainService = availableFeatures.remainService + remainService = availableFeatures.remainService, + outingService = availableFeatures.outingService ) } } diff --git a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/entity/AvailableFeatureJpaEntity.kt b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/entity/AvailableFeatureJpaEntity.kt index 0f9431ed6..81e993f83 100644 --- a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/entity/AvailableFeatureJpaEntity.kt +++ b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/entity/AvailableFeatureJpaEntity.kt @@ -35,6 +35,9 @@ class AvailableFeatureJpaEntity( val studyRoomService: Boolean, @Column(columnDefinition = "TINYINT(1)", nullable = false) - val remainService: Boolean + val remainService: Boolean, + + @Column(columnDefinition = "TINYINT(1)", nullable = false) + val outingService: Boolean, ) diff --git a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/mapper/AvailableFeatureMapper.kt b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/mapper/AvailableFeatureMapper.kt index 520f2fb15..5a69f1439 100644 --- a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/mapper/AvailableFeatureMapper.kt +++ b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/school/mapper/AvailableFeatureMapper.kt @@ -20,7 +20,8 @@ class AvailableFeatureMapper( noticeService = entity.noticeService, pointService = entity.pointService, studyRoomService = entity.studyRoomService, - remainService = entity.remainService + remainService = entity.remainService, + outingService = entity.outingService ) } } @@ -35,7 +36,8 @@ class AvailableFeatureMapper( noticeService = domain.noticeService, pointService = domain.pointService, studyRoomService = domain.studyRoomService, - remainService = domain.remainService + remainService = domain.remainService, + outingService = domain.outingService ) } } From db331193e82f3f0550d3f5eb1ad7a6e7af2d83a0 Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Thu, 25 Apr 2024 08:55:12 +0900 Subject: [PATCH 2/3] style: (#614) detekt --- .../persistence/outing/OutingApplicationPersistenceAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/outing/OutingApplicationPersistenceAdapter.kt b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/outing/OutingApplicationPersistenceAdapter.kt index 2c2d7b290..9fd9d8a04 100644 --- a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/outing/OutingApplicationPersistenceAdapter.kt +++ b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/outing/OutingApplicationPersistenceAdapter.kt @@ -15,7 +15,6 @@ import team.aliens.dms.persistence.outing.entity.QOutingApplicationJpaEntity.out import team.aliens.dms.persistence.outing.entity.QOutingCompanionJpaEntity.outingCompanionJpaEntity import team.aliens.dms.persistence.outing.entity.QOutingTypeJpaEntity.outingTypeJpaEntity import team.aliens.dms.persistence.outing.mapper.OutingApplicationMapper -import team.aliens.dms.persistence.outing.mapper.OutingCompanionMapper import team.aliens.dms.persistence.outing.repository.OutingApplicationJpaRepository import team.aliens.dms.persistence.outing.repository.OutingCompanionJpaRepository import team.aliens.dms.persistence.outing.repository.vo.QQueryCurrentOutingApplicationVO @@ -153,7 +152,8 @@ class OutingApplicationPersistenceAdapter( override fun deleteOutingApplication(outingApplication: OutingApplication) { outingCompanionsRepository.deleteAllByOutingApplication( - outingApplicationMapper.toEntity(outingApplication)) + outingApplicationMapper.toEntity(outingApplication) + ) outingApplicationRepository.delete( outingApplicationMapper.toEntity(outingApplication) From 78dab4a688c66ede8cb0cadf26128b205ac9ece5 Mon Sep 17 00:00:00 2001 From: "tae.y" <0211ilyoil@gmail.com> Date: Thu, 25 Apr 2024 10:36:00 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20(#614)=20availableFeature=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=97=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/team/aliens/dms/domain/school/stub/SchoolStub.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dms-core/src/test/kotlin/team/aliens/dms/domain/school/stub/SchoolStub.kt b/dms-core/src/test/kotlin/team/aliens/dms/domain/school/stub/SchoolStub.kt index 95288cd45..ed765ce0f 100644 --- a/dms-core/src/test/kotlin/team/aliens/dms/domain/school/stub/SchoolStub.kt +++ b/dms-core/src/test/kotlin/team/aliens/dms/domain/school/stub/SchoolStub.kt @@ -32,11 +32,13 @@ internal fun createAvailableFeatureStub( remainService: Boolean = true, pointService: Boolean = true, noticeService: Boolean = true, + outingService: Boolean = true ) = AvailableFeature( schoolId = schoolId, mealService = mealService, studyRoomService = studyRoomService, remainService = remainService, pointService = pointService, - noticeService = noticeService + noticeService = noticeService, + outingService = outingService )