remove: Room 테이블 제거 및 Schedule 테이블의 roomId -> storeId 수정

This commit is contained in:
이상진 2025-09-15 17:49:19 +09:00
parent 163b7991d3
commit 072ca7c457
3 changed files with 1 additions and 44 deletions

View File

@ -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
}

View File

@ -1,5 +0,0 @@
package roomescape.store.infrastructure.persistence
import org.springframework.data.jpa.repository.JpaRepository
interface RoomRepository : JpaRepository<RoomEntity, Long>

View File

@ -28,21 +28,6 @@ create table if not exists store(
constraint fk_store__region_code foreign key (region_code) references region (code) 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( create table if not exists users(
id bigint primary key, id bigint primary key,
name varchar(50) not null, name varchar(50) not null,
@ -131,6 +116,7 @@ create table if not exists schedule (
id bigint primary key, id bigint primary key,
date date not null, date date not null,
time time not null, time time not null,
store_id bigint not null,
theme_id bigint not null, theme_id bigint not null,
status varchar(30) not null, status varchar(30) not null,
created_at timestamp not null, created_at timestamp not null,