diff --git a/backend/src/main/java/com/isp/backend/domain/schedule/entity/Schedule.java b/backend/src/main/java/com/isp/backend/domain/schedule/entity/Schedule.java index 2bd92bc8..8f34dbda 100644 --- a/backend/src/main/java/com/isp/backend/domain/schedule/entity/Schedule.java +++ b/backend/src/main/java/com/isp/backend/domain/schedule/entity/Schedule.java @@ -2,6 +2,7 @@ import com.isp.backend.domain.country.entity.Country; import com.isp.backend.domain.member.entity.Member; +import com.isp.backend.domain.scheduleDetail.entity.CheckList; import com.isp.backend.domain.scheduleDetail.entity.ScheduleDetail; import com.isp.backend.global.common.BaseEntity; import jakarta.persistence.*; @@ -49,5 +50,8 @@ public class Schedule extends BaseEntity { @Column(nullable = false) private boolean activated = true; + @OneToMany(mappedBy = "schedule", cascade = CascadeType.ALL, orphanRemoval = true) + private List checkLists = new ArrayList<>(); + }