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 dcc4b95..c588112 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 @@ -3,9 +3,11 @@ package com.edufocus.edufocus.report.entity.vo; import com.edufocus.edufocus.quiz.entity.QuizSet; import com.edufocus.edufocus.report.entity.dto.ReportResponse; import com.edufocus.edufocus.user.model.entity.vo.User; +import com.fasterxml.jackson.annotation.JsonAutoDetect; import jakarta.persistence.*; import lombok.*; import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.LocalDateTime; import java.util.Date; @@ -17,6 +19,8 @@ import java.util.List; @NoArgsConstructor @AllArgsConstructor @Builder +@EntityListeners(AuditingEntityListener.class) +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) public class Report { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) 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 2dedc12..e097f97 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 @@ -3,11 +3,13 @@ package com.edufocus.edufocus.report.entity.vo; import com.edufocus.edufocus.lecture.entity.Lecture; import com.edufocus.edufocus.quiz.entity.QuizSet; import com.edufocus.edufocus.report.entity.dto.ReportSetResponse; +import com.fasterxml.jackson.annotation.JsonAutoDetect; import jakarta.persistence.*; import lombok.*; import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.GenericGenerator; import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.LocalDateTime; @@ -21,6 +23,8 @@ import java.util.UUID; @Builder @NoArgsConstructor @AllArgsConstructor +@EntityListeners(AuditingEntityListener.class) +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) public class ReportSet { @Id @GeneratedValue(generator = "UUID")