generated from pricelees/issue-pr-template
[#52] 만료 예약 / 일정 스케쥴링 작업 추가 및 동시성 처리를 위한 일부 코드 수정 #53
@ -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?,
|
||||
|
||||
@ -124,6 +124,7 @@ create table if not exists schedule (
|
||||
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),
|
||||
|
||||
@ -124,6 +124,7 @@ create table if not exists schedule (
|
||||
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