# DDL
# SPACE
create table space
(
id bigint auto_increment primary key,
map_id bigint not null,
area varchar(255) not null,
color varchar(25) null,
description varchar(255) null,
name varchar(20) not null,
available_end_time time not null,
available_start_time time not null,
reservation_enable bit not null,
constraint space_ibfk_1
foreign key (map_id) references map (id)
);
create index map_id
on space (map_id);
# SETTING
create table setting
(
id bigint auto_increment primary key,
space_id bigint not null,
enabled_day_of_week varchar(255) null,
setting_start_time time not null,
setting_end_time time not null,
reservation_maximum_time_unit int not null,
reservation_minimum_time_unit int not null,
reservation_time_unit int not null,
constraint setting_ibfk_1
foreign key (space_id) references space (id)
);
# PRESET
create table preset
(
id bigint auto_increment primary key,
name varchar(20) not null,
setting_start_time time not null,
setting_end_time time not null,
reservation_time_unit int not null,
reservation_minimum_time_unit int not null,
reservation_maximum_time_unit int not null,
enabled_day_of_week varchar(255) null,
member_id bigint not null,
constraint preset_ibfk_1
foreign key (member_id) references member (id)
);
create index manager_id
on preset (member_id);
비즈니스 로직
[ ] Space, Setting, Preset Entity들 DDL 맞춰서 변경
[ ] setting, preset 공통 칼럼들 빼서 embedded 클래스 생성 가능할 듯!
[ ] e.g. SettingCondition, SettingState, SettingItem, ... (네이밍은 논의 필요)
기능 상세
도메인 설계 변경
[ ] setting 테이블 추가 (i.e. Space 테이블 찢기)
변경 대상 테이블
비즈니스 로직