From 49bf79dd05a9bfee133a78a18dcfa5e20fa21e4a Mon Sep 17 00:00:00 2001 From: yulmam <70622601+yulmam@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:10:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat=20:=20=EC=8B=9C=EA=B0=84=EB=8C=80=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/edufocus/edufocus/board/entity/vo/Board.java | 2 ++ .../com/edufocus/edufocus/board/entity/vo/Comment.java | 8 ++++++-- .../edufocus/report/controller/ReportController.java | 3 --- .../com/edufocus/edufocus/report/entity/vo/Report.java | 1 + .../com/edufocus/edufocus/report/entity/vo/ReportSet.java | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) 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; From 696fb85a21d45f5247aa5a6760402cc5eafa6e11 Mon Sep 17 00:00:00 2001 From: yulmam <70622601+yulmam@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:10:46 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat=20:=20getter=20setter=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edufocus/report/entity/dto/ReportSetResponse.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/ReportSetResponse.java b/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/ReportSetResponse.java index ad300bf..a7ea791 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/ReportSetResponse.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/entity/dto/ReportSetResponse.java @@ -1,14 +1,14 @@ package com.edufocus.edufocus.report.entity.dto; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.NoArgsConstructor; +import lombok.*; import java.time.LocalDateTime; import java.util.UUID; @Builder +@Getter +@Setter @NoArgsConstructor @AllArgsConstructor public class ReportSetResponse {