From b886325d3f2b98aa42922f1f41abbf1ad0256636 Mon Sep 17 00:00:00 2001 From: dhyeonkim Date: Tue, 20 Aug 2024 16:08:30 +0900 Subject: [PATCH] style: place schedule ID --- .../output/persistence/postgresql/adapter/PlaceAdapter.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/PlaceAdapter.kt b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/PlaceAdapter.kt index 2b4cb971..7eae93f2 100644 --- a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/PlaceAdapter.kt +++ b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/PlaceAdapter.kt @@ -27,7 +27,7 @@ class PlaceAdapter( val placeEntity = PlaceEntity( roomUid = roomUid, - scheduleId = scheduleId, + scheduleId = place.id, place = place, ) return placeRepository.save(placeEntity).toDomain() @@ -39,11 +39,11 @@ class PlaceAdapter( places: List, ): List { val placeEntities = - places.zip(scheduleIds) { place, scheduleId -> + places.map { PlaceEntity( roomUid = roomUid, - scheduleId = scheduleId, - place = place, + scheduleId = it.id, + place = it, ) } return placeRepository.saveAll(placeEntities).map { it.toDomain() }