generated from pricelees/issue-pr-template
remove: Room 테이블 제거 및 Schedule 테이블의 roomId -> storeId 수정
This commit is contained in:
parent
163b7991d3
commit
072ca7c457
@ -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
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
package roomescape.store.infrastructure.persistence
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
|
||||
interface RoomRepository : JpaRepository<RoomEntity, Long>
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user