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,