From 11a0964bbc772dcb83167ccd3db0df2310a973a2 Mon Sep 17 00:00:00 2001 From: thguss Date: Sat, 27 Jul 2024 14:55:49 +0900 Subject: [PATCH 1/3] delete: delete course entity --- .../application/domain/course/Course.kt | 7 ------ .../persistence/entity/CourseEntity.kt | 22 ------------------- 2 files changed, 29 deletions(-) delete mode 100644 piikii-application/src/main/kotlin/com/piikii/application/domain/course/Course.kt delete mode 100644 piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/CourseEntity.kt diff --git a/piikii-application/src/main/kotlin/com/piikii/application/domain/course/Course.kt b/piikii-application/src/main/kotlin/com/piikii/application/domain/course/Course.kt deleted file mode 100644 index 43a12dfd..00000000 --- a/piikii-application/src/main/kotlin/com/piikii/application/domain/course/Course.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.piikii.application.domain.course - -class Course( - val roomUid: Long, - val scheduleId: Long, - val placeId: Long, -) diff --git a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/CourseEntity.kt b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/CourseEntity.kt deleted file mode 100644 index e53a2400..00000000 --- a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/CourseEntity.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.piikii.output.persistence.postgresql.persistence.entity - -import com.piikii.output.persistence.postgresql.persistence.common.BaseEntity -import jakarta.persistence.Column -import jakarta.persistence.Entity -import jakarta.persistence.Table -import org.hibernate.annotations.DynamicUpdate -import org.hibernate.annotations.SQLRestriction -import java.util.UUID - -@Entity -@Table(name = "course", schema = "piikii") -@SQLRestriction("is_deleted = false") -@DynamicUpdate -class CourseEntity( - @Column(name = "room_uid", nullable = false) - val roomUid: UUID, - @Column(name = "schedule_id", nullable = false, unique = true) - val scheduleId: Long, - @Column(name = "place_id", nullable = false) - val placeId: Long, -) : BaseEntity() From 1c0606bf3a48f144f1bb0d6cb8ef70fbe5047ac3 Mon Sep 17 00:00:00 2001 From: thguss Date: Sat, 27 Jul 2024 14:58:28 +0900 Subject: [PATCH 2/3] delete: delete course entity --- .../persistence/postgresql/adapter/CourseAdapter.kt | 8 +++----- .../persistence/repository/CourseRepository.kt | 9 --------- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/repository/CourseRepository.kt diff --git a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/CourseAdapter.kt b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/CourseAdapter.kt index d4229a82..743f5fa3 100644 --- a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/CourseAdapter.kt +++ b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/adapter/CourseAdapter.kt @@ -1,15 +1,13 @@ package com.piikii.output.persistence.postgresql.adapter import com.piikii.application.port.output.persistence.CourseQueryPort -import com.piikii.output.persistence.postgresql.persistence.repository.CourseRepository import org.springframework.stereotype.Repository import java.util.UUID @Repository -class CourseAdapter( - private val courseRepository: CourseRepository, -) : CourseQueryPort { +class CourseAdapter() : CourseQueryPort { override fun isCourseExist(roomUid: UUID): Boolean { - return courseRepository.existsByroomUid(roomUid) + // TODO: implement + return false } } diff --git a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/repository/CourseRepository.kt b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/repository/CourseRepository.kt deleted file mode 100644 index 39e72e0f..00000000 --- a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/repository/CourseRepository.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.piikii.output.persistence.postgresql.persistence.repository - -import com.piikii.output.persistence.postgresql.persistence.entity.CourseEntity -import org.springframework.data.jpa.repository.JpaRepository -import java.util.UUID - -interface CourseRepository : JpaRepository { - fun existsByroomUid(roomUid: UUID): Boolean -} From 4c3615e1ec4ac76dcc95432fd00560248c3a7ffb Mon Sep 17 00:00:00 2001 From: thguss Date: Sat, 27 Jul 2024 15:00:55 +0900 Subject: [PATCH 3/3] add: add column to place entity --- .../persistence/postgresql/persistence/entity/PlaceEntity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt index 463c51d8..4b73f13a 100644 --- a/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt +++ b/piikii-output-persistence/postgresql/src/main/kotlin/com/piikii/output/persistence/postgresql/persistence/entity/PlaceEntity.kt @@ -41,6 +41,8 @@ class PlaceEntity( var origin: Origin, @Column(name = "memo", length = 150) var memo: String?, + @Column(name = "confirmed", nullable = false) + var confirmed: Boolean = false, ) : BaseEntity() { constructor(roomUid: UUID, scheduleId: Long, place: Place) : this( roomUid = roomUid,