generated from pricelees/issue-pr-template
feat: Schedule이 Hold 상태일 때 만료시간에 해당되는 holdExpiredAt 컬럼 추가
This commit is contained in:
parent
08b9920ee3
commit
a8ed0de625
@ -4,6 +4,7 @@ import com.sangdol.common.persistence.AuditingBaseEntity
|
||||
import jakarta.persistence.*
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
import java.time.LocalTime
|
||||
|
||||
@Entity
|
||||
@ -19,6 +20,7 @@ class ScheduleEntity(
|
||||
|
||||
@Enumerated(value = EnumType.STRING)
|
||||
var status: ScheduleStatus,
|
||||
var holdExpiredAt: LocalDateTime? = null
|
||||
) : AuditingBaseEntity(id) {
|
||||
fun modifyIfNotNull(
|
||||
time: LocalTime?,
|
||||
|
||||
@ -114,16 +114,17 @@ create table if not exists theme (
|
||||
);
|
||||
|
||||
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,
|
||||
created_by bigint not null,
|
||||
updated_at timestamp not null,
|
||||
updated_by bigint not null,
|
||||
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,
|
||||
created_by bigint not null,
|
||||
updated_at timestamp not null,
|
||||
updated_by bigint not null,
|
||||
hold_expired_at timestamp null,
|
||||
|
||||
constraint uk_schedule__store_id_date_time_theme_id unique (store_id, date, time, theme_id),
|
||||
constraint fk_schedule__store_id foreign key (store_id) references store (id),
|
||||
|
||||
@ -114,16 +114,17 @@ create table if not exists theme (
|
||||
);
|
||||
|
||||
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 datetime(6) not null,
|
||||
created_by bigint not null,
|
||||
updated_at datetime(6) not null,
|
||||
updated_by bigint not null,
|
||||
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 datetime(6) not null,
|
||||
created_by bigint not null,
|
||||
updated_at datetime(6) not null,
|
||||
updated_by bigint not null,
|
||||
hold_expired_at datetime(6) null,
|
||||
|
||||
constraint uk_schedule__store_id_date_time_theme_id unique (store_id, date, time, theme_id),
|
||||
constraint fk_schedule__store_id foreign key (store_id) references store (id),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user