From 072ca7c4573203aa9bcff081a74c3e18bf9a6650 Mon Sep 17 00:00:00 2001 From: pricelees Date: Mon, 15 Sep 2025 17:49:19 +0900 Subject: [PATCH] =?UTF-8?q?remove:=20Room=20=ED=85=8C=EC=9D=B4=EB=B8=94=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0=20=EB=B0=8F=20Schedule=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=EC=9D=98=20roomId=20->=20storeId=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infrastructure/persistence/RoomEntity.kt | 24 ------------------- .../persistence/RoomRepository.kt | 5 ---- src/main/resources/schema/schema-h2.sql | 16 +------------ 3 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 src/main/kotlin/roomescape/store/infrastructure/persistence/RoomEntity.kt delete mode 100644 src/main/kotlin/roomescape/store/infrastructure/persistence/RoomRepository.kt diff --git a/src/main/kotlin/roomescape/store/infrastructure/persistence/RoomEntity.kt b/src/main/kotlin/roomescape/store/infrastructure/persistence/RoomEntity.kt deleted file mode 100644 index 42f943b4..00000000 --- a/src/main/kotlin/roomescape/store/infrastructure/persistence/RoomEntity.kt +++ /dev/null @@ -1,24 +0,0 @@ -package roomescape.store.infrastructure.persistence - -import jakarta.persistence.Entity -import jakarta.persistence.EnumType -import jakarta.persistence.Enumerated -import jakarta.persistence.Table -import roomescape.common.entity.AuditingBaseEntity - -@Entity -@Table(name = "room") -class RoomEntity( - id: Long, - - var name: String, - val storeId: Long, - var maxCapacity: Short, - - @Enumerated(EnumType.STRING) - var status: RoomStatus -): AuditingBaseEntity(id) - -enum class RoomStatus { - AVAILABLE, DISABLED -} diff --git a/src/main/kotlin/roomescape/store/infrastructure/persistence/RoomRepository.kt b/src/main/kotlin/roomescape/store/infrastructure/persistence/RoomRepository.kt deleted file mode 100644 index a51f194b..00000000 --- a/src/main/kotlin/roomescape/store/infrastructure/persistence/RoomRepository.kt +++ /dev/null @@ -1,5 +0,0 @@ -package roomescape.store.infrastructure.persistence - -import org.springframework.data.jpa.repository.JpaRepository - -interface RoomRepository : JpaRepository \ No newline at end of file diff --git a/src/main/resources/schema/schema-h2.sql b/src/main/resources/schema/schema-h2.sql index 37cec409..374adaf9 100644 --- a/src/main/resources/schema/schema-h2.sql +++ b/src/main/resources/schema/schema-h2.sql @@ -28,21 +28,6 @@ create table if not exists store( constraint fk_store__region_code foreign key (region_code) references region (code) ); -create table if not exists room( - id bigint primary key , - name varchar(20) not null, - store_id bigint not null, - max_capacity smallint not null, - status varchar(20) not null, - - created_at timestamp not null, - created_by bigint not null, - updated_at timestamp not null, - updated_by bigint not null, - - constraint fk_room__store_id foreign key (store_id) references store (id) -); - create table if not exists users( id bigint primary key, name varchar(50) not null, @@ -131,6 +116,7 @@ create table if not exists schedule ( id bigint primary key, date date not null, time time not null, + store_id bigint not null, theme_id bigint not null, status varchar(30) not null, created_at timestamp not null,