Skip to content

Commit 3c7056f

Browse files
committed
refact: 엔티티 제약조건 추가
1 parent b31ded2 commit 3c7056f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/back/domain/study/record/entity/StudyRecord.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,20 @@ public class StudyRecord extends BaseEntity {
2929
private StudyPlan studyPlan;
3030

3131
@ManyToOne(fetch = FetchType.LAZY)
32-
@JoinColumn(name = "room_id")
32+
@JoinColumn(name = "room_id", nullable = false)
3333
private Room room;
3434

3535
// 초 단위
3636
@Column(nullable = false)
3737
private Long duration;
3838

39+
@Column(nullable = false)
3940
private LocalDateTime startTime;
4041

4142
@OneToMany(mappedBy = "studyRecord", cascade = CascadeType.ALL, orphanRemoval = true)
4243
private List<PauseInfo> pauseInfos = new ArrayList<>();
4344

45+
@Column(nullable = false)
4446
private LocalDateTime endTime;
4547

4648
public static StudyRecord create(User user, StudyPlan studyPlan, Room room,

0 commit comments

Comments
 (0)