diff --git a/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Board.java b/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Board.java index e4fba11..0f7d34a 100644 --- a/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Board.java +++ b/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Board.java @@ -40,9 +40,11 @@ public class Board { @Column(nullable = true) private int viewCount; + @Column(columnDefinition = "TIMESTAMP") @CreatedDate LocalDateTime createdAt; + @Column(columnDefinition = "TIMESTAMP") @LastModifiedDate LocalDateTime modifiedAt; diff --git a/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Comment.java b/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Comment.java index 9bd6361..9887128 100644 --- a/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Comment.java +++ b/backend/src/main/java/com/edufocus/edufocus/board/entity/vo/Comment.java @@ -9,6 +9,8 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.NoArgsConstructor; import lombok.Setter; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; import java.time.LocalDateTime; @@ -26,10 +28,12 @@ public class Comment { @Column(columnDefinition = "TEXT", nullable = false) private String content; - @Column + @Column(columnDefinition = "TIMESTAMP") + @CreatedDate private LocalDateTime createdAt; - @Column + @Column(columnDefinition = "TIMESTAMP") + @LastModifiedDate private LocalDateTime modifiedAt; @ManyToOne diff --git a/backend/src/main/java/com/edufocus/edufocus/report/controller/ReportController.java b/backend/src/main/java/com/edufocus/edufocus/report/controller/ReportController.java index 3dfda46..ec1c747 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/controller/ReportController.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/controller/ReportController.java @@ -64,9 +64,6 @@ public class ReportController { return new ResponseEntity<>(detailReport, HttpStatus.OK); } - - - @GetMapping("/teacher/reportSet/{lectureId}") public ResponseEntity> searchReportSets(@PathVariable("lectureId") long lectureId){ List reportSetResponses = reportService.findReportSets(lectureId); diff --git a/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/Report.java b/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/Report.java index c588112..9205532 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/Report.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/Report.java @@ -30,6 +30,7 @@ public class Report { private int correctCount; + @Column(columnDefinition = "TIMESTAMP") @CreatedDate private LocalDateTime testAt; diff --git a/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/ReportSet.java b/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/ReportSet.java index 5ff6b88..7f8f691 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/ReportSet.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/entity/vo/ReportSet.java @@ -34,6 +34,7 @@ public class ReportSet { ) private UUID id; + @Column(columnDefinition = "TIMESTAMP") @CreatedDate private LocalDateTime createAt;