feat: 테마 스키마 재정의 및 엔티티 추가

This commit is contained in:
이상진 2025-08-27 16:16:37 +09:00
parent aad8d3a4ff
commit 5ed632b1b3
3 changed files with 42 additions and 2 deletions

View File

@ -3,9 +3,7 @@ package roomescape
import org.springframework.boot.Banner
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.data.jpa.repository.config.EnableJpaAuditing
@EnableJpaAuditing
@SpringBootApplication
class RoomescapeApplication

View File

@ -27,6 +27,27 @@ create table if not exists themes (
last_modified_at timestamp
);
create table if not exists theme (
id bigint primary key ,
name varchar(30) not null,
difficulty varchar(20) not null,
description varchar(255) not null,
thumbnail_url varchar(255) not null,
price int not null,
min_participants smallint not null,
max_participants smallint not null,
available_minutes smallint not null,
expected_minutes_from smallint not null,
expected_minutes_to smallint not null,
created_at timestamp not null,
created_by bigint not null,
updated_at timestamp not null,
updated_by bigint not null,
constraint fk_theme__created_by foreign key (created_by) references members (member_id),
constraint fk_theme__updated_by foreign key (updated_by) references members (member_id)
);
create table if not exists times (
time_id bigint primary key,
start_at time not null,

View File

@ -29,6 +29,27 @@ create table if not exists themes
last_modified_at datetime(6) null
);
create table if not exists theme (
id bigint primary key ,
name varchar(30) not null,
difficulty varchar(20) not null,
description varchar(255) not null,
thumbnail_url varchar(255) not null,
price int not null,
min_participants smallint not null,
max_participants smallint not null,
available_minutes smallint not null,
expected_minutes_from smallint not null,
expected_minutes_to smallint not null,
created_at datetime(6) not null,
created_by bigint not null,
updated_at datetime(6) not null,
updated_by bigint not null,
constraint fk_theme__created_by foreign key (created_by) references members (member_id),
constraint fk_theme__updated_by foreign key (updated_by) references members (member_id)
);
create table if not exists times
(
time_id bigint primary key,