-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
183 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
vacgom-api/src/main/kotlin/kr/co/vacgom/api/global/presentation/GlobalPath.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package kr.co.vacgom.api.global.presentation | ||
|
||
object GlobalPath { | ||
const val BASE_URL = "/api/v3" | ||
const val BASE_V3 = "/api/v3" | ||
} |
14 changes: 0 additions & 14 deletions
14
...-api/src/main/kotlin/kr/co/vacgom/api/inoculation/application/InoculationCreateService.kt
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...om-api/src/main/kotlin/kr/co/vacgom/api/inoculation/application/InoculationReadService.kt
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...om-api/src/main/kotlin/kr/co/vacgom/api/inoculation/application/dto/CreateInoculations.kt
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...om-api/src/main/kotlin/kr/co/vacgom/api/inoculation/presentation/InoculationController.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
vacgom-api/src/main/kotlin/kr/co/vacgom/api/inoculation/presentation/InoculationPath.kt
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...-api/src/main/kotlin/kr/co/vacgom/api/vaccination/application/VaccinationCreateService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package kr.co.vacgom.api.vaccination.application | ||
|
||
import kr.co.vacgom.api.vaccination.application.dto.CreateVaccinations | ||
import kr.co.vacgom.persistence.vaccination.infrastructure.VaccinationRepository | ||
import org.springframework.stereotype.Service | ||
import org.springframework.transaction.annotation.Transactional | ||
|
||
@Service | ||
@Transactional | ||
class VaccinationCreateService( | ||
private val vaccinationRepository: VaccinationRepository | ||
) { | ||
fun createVaccinations(request: CreateVaccinations.ClientRequest) { | ||
|
||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...om-api/src/main/kotlin/kr/co/vacgom/api/vaccination/application/VaccinationReadService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package kr.co.vacgom.api.vaccination.application | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class VaccinationReadService |
23 changes: 23 additions & 0 deletions
23
...om-api/src/main/kotlin/kr/co/vacgom/api/vaccination/application/dto/CreateVaccinations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package kr.co.vacgom.api.vaccination.application.dto | ||
|
||
import java.time.LocalDate | ||
import java.util.* | ||
|
||
class CreateVaccinations { | ||
sealed class ClientRequest { | ||
|
||
data class Request(val vaccinations: List<VaccinationRequest>) | ||
|
||
data class VaccinationRequest( | ||
val doseRound: Long, | ||
val doseDescription: String?, | ||
val vaccinatedDate: LocalDate, | ||
val vaccinationFacility: String?, | ||
val vaccineManufacturer: String?, | ||
val vaccineProductName: String?, | ||
val vaccineLotNumber: String? | ||
) | ||
} | ||
|
||
sealed class ClientResponse(val id: UUID) | ||
} |
35 changes: 35 additions & 0 deletions
35
vacgom-api/src/main/kotlin/kr/co/vacgom/api/vaccination/domain/Vaccination.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package kr.co.vacgom.api.vaccination.domain | ||
|
||
import java.time.LocalDate | ||
|
||
data class Vaccination( | ||
val doseRound: Long, | ||
val doseDescription: String, | ||
val vaccinatedDate: LocalDate, | ||
val vaccinationFacility: String?, | ||
val vaccinationManufacturer: String?, | ||
val vaccineProductName: String?, | ||
val vaccineLotNumber: String? | ||
) { | ||
companion object { | ||
fun create( | ||
doseRound: Long, | ||
doseDescription: String, | ||
vaccinatedDate: LocalDate, | ||
vaccinationFacility: String? = null, | ||
vaccinationManufacturer: String? = null, | ||
vaccineProductName: String? = null, | ||
vaccineLotNumber: String? = null | ||
): Vaccination { | ||
return Vaccination( | ||
doseRound, | ||
doseDescription, | ||
vaccinatedDate, | ||
vaccinationFacility, | ||
vaccinationManufacturer, | ||
vaccineProductName, | ||
vaccineLotNumber | ||
) | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...om-api/src/main/kotlin/kr/co/vacgom/api/vaccination/presentation/VaccinationController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package kr.co.vacgom.api.vaccination.presentation | ||
|
||
import kr.co.vacgom.api.global.presentation.GlobalPath.BASE_V3 | ||
import kr.co.vacgom.api.vaccination.application.VaccinationCreateService | ||
import kr.co.vacgom.api.vaccination.application.VaccinationReadService | ||
import kr.co.vacgom.api.vaccination.application.dto.CreateVaccinations | ||
import kr.co.vacgom.api.vaccination.presentation.VaccinationPath.VACCINATIONS | ||
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.RestController | ||
|
||
@RestController | ||
@RequestMapping(BASE_V3 + VACCINATIONS) | ||
class VaccinationController( | ||
private val vaccinationCreateService: VaccinationCreateService, | ||
private val vaccinationReadService: VaccinationReadService | ||
) { | ||
|
||
@PostMapping | ||
fun createVaccinations( | ||
@RequestBody request: CreateVaccinations.ClientRequest | ||
) { | ||
vaccinationCreateService.createVaccinations(request) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
vacgom-api/src/main/kotlin/kr/co/vacgom/api/vaccination/presentation/VaccinationPath.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package kr.co.vacgom.api.vaccination.presentation | ||
|
||
object VaccinationPath { | ||
const val VACCINATIONS = "/vaccinations" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ulation/domain/constants/VaccineType.java → ...ination/entity/constants/VaccineType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...in/java/kr/co/vacgom/persistence/vaccination/infrastructure/VaccinationJpaRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package kr.co.vacgom.persistence.vaccination.infrastructure; | ||
|
||
import kr.co.vacgom.persistence.vaccination.entity.VaccinationEntity; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.UUID; | ||
|
||
interface VaccinationJpaRepository extends JpaRepository<VaccinationEntity, UUID> { | ||
} |
7 changes: 7 additions & 0 deletions
7
...va/kr/co/vacgom/persistence/vaccination/infrastructure/VaccinationQueryDslRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package kr.co.vacgom.persistence.vaccination.infrastructure; | ||
|
||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
class VaccinationQueryDslRepository { | ||
} |
14 changes: 14 additions & 0 deletions
14
.../main/java/kr/co/vacgom/persistence/vaccination/infrastructure/VaccinationRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package kr.co.vacgom.persistence.vaccination.infrastructure; | ||
|
||
import kr.co.vacgom.persistence.vaccination.entity.VaccinationEntity; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.List; | ||
|
||
@Repository | ||
public interface VaccinationRepository { | ||
|
||
VaccinationEntity save(VaccinationEntity vaccination); | ||
|
||
List<VaccinationEntity> saveAll(List<VaccinationEntity> vaccinations); | ||
} |
25 changes: 25 additions & 0 deletions
25
...ava/kr/co/vacgom/persistence/vaccination/infrastructure/VaccinationRepositoryAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package kr.co.vacgom.persistence.vaccination.infrastructure; | ||
|
||
import kr.co.vacgom.persistence.vaccination.entity.VaccinationEntity; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.List; | ||
|
||
@Repository | ||
@RequiredArgsConstructor | ||
class VaccinationRepositoryAdapter implements VaccinationRepository { | ||
|
||
private final VaccinationQueryDslRepository vaccinationQueryDslRepository; | ||
private final VaccinationJpaRepository vaccinationJpaRepository; | ||
|
||
@Override | ||
public VaccinationEntity save(VaccinationEntity vaccination) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public List<VaccinationEntity> saveAll(List<VaccinationEntity> vaccinations) { | ||
return List.of(); | ||
} | ||
} |