diff --git a/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java b/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java index 022d1d28d..177cd9c8a 100644 --- a/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java +++ b/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java @@ -4,6 +4,8 @@ import com.festago.common.exception.BadRequestException; import com.festago.common.exception.ErrorCode; import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; @@ -26,6 +28,7 @@ public class EntryAlert extends BaseTimeEntity { private LocalDateTime entryTime; @NotNull + @Enumerated(value = EnumType.STRING) private AlertStatus status = AlertStatus.PENDING; protected EntryAlert() { diff --git a/backend/src/main/resources/db/migration/V6__entry_alert.sql b/backend/src/main/resources/db/migration/V6__entry_alert.sql index 37f2e15f2..33f04f892 100644 --- a/backend/src/main/resources/db/migration/V6__entry_alert.sql +++ b/backend/src/main/resources/db/migration/V6__entry_alert.sql @@ -1,8 +1,11 @@ create table if not exists entry_alert ( id bigint not null auto_increment, + created_at datetime(6), + updated_at datetime(6), entry_time datetime(6) not null, stage_id bigint not null, + status varchar(255) not null, primary key (id) ) engine innodb default charset = utf8mb4