feat : timezone 변경

This commit is contained in:
yulmam 2024-08-09 14:20:31 +09:00
parent bf735c4d5d
commit 405e45b9d1
10 changed files with 33 additions and 21 deletions

View File

@ -6,6 +6,7 @@ import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.Date;
@Builder
@Getter
@ -17,6 +18,6 @@ public class ResponseBoardDetailDto {
private String title;
private String content;
private boolean isMine;
private LocalDateTime createdAt;
private LocalDateTime modifiedAt;
private Date createdAt;
private Date modifiedAt;
}

View File

@ -6,6 +6,7 @@ import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.Date;
@Builder
@Getter
@ -14,5 +15,5 @@ public class ResponseBoardSummaryDto {
private long id;
private String name;
private String title;
private LocalDateTime createdAt;
private Date createdAt;
}

View File

@ -6,6 +6,7 @@ import lombok.Setter;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
@Builder
@Getter
@ -15,6 +16,6 @@ public class ResponseCommentDto {
private String name;
private String content;
private boolean isMine;
private LocalDateTime createAt;
private LocalDateTime modifiedAt;
private Date createAt;
private Date modifiedAt;
}

View File

@ -15,6 +15,7 @@ import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@Entity
@ -42,13 +43,15 @@ public class Board {
@Column(nullable = true)
private int viewCount;
@Column(columnDefinition = "TIMESTAMP")
@Column
@CreationTimestamp
LocalDateTime createdAt;
@Temporal(TemporalType.TIMESTAMP)
private Date createdAt;
@Column(columnDefinition = "TIMESTAMP")
@Column
@UpdateTimestamp
LocalDateTime modifiedAt;
@Temporal(TemporalType.TIMESTAMP)
private Date modifiedAt;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id")

View File

@ -15,6 +15,7 @@ import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import java.time.LocalDateTime;
import java.util.Date;
@Entity
@Builder
@ -30,13 +31,14 @@ public class Comment {
@Column(columnDefinition = "TEXT", nullable = false)
private String content;
@Column(columnDefinition = "TIMESTAMP")
@Column
@CreationTimestamp
private LocalDateTime createdAt;
@Temporal(TemporalType.TIMESTAMP)
private Date createdAt;
@Column(columnDefinition = "TIMESTAMP")
@UpdateTimestamp
private LocalDateTime modifiedAt;
@Column
@Temporal(TemporalType.TIMESTAMP)
private Date modifiedAt;
@ManyToOne
@JoinColumn(name = "user_id")

View File

@ -14,6 +14,6 @@ public class ReportDetailResponseDto {
private int allCount;
private String title;
private int correctCount;
private LocalDateTime testAt;
private Date testAt;
private List<QuizDto> quizzes;
}

View File

@ -16,5 +16,5 @@ public class ReportResponse {
private String title;
private int allCount;
private int correctCount;
private LocalDateTime date;
private Date date;
}

View File

@ -4,6 +4,7 @@ package com.edufocus.edufocus.report.entity.dto;
import lombok.*;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.UUID;
@Builder
@ -14,5 +15,5 @@ import java.util.UUID;
public class ReportSetResponse {
private UUID reportSetId;
private String quizSetTitle;
private LocalDateTime testAt;
private Date testAt;
}

View File

@ -31,9 +31,10 @@ public class Report {
private int correctCount;
@Column(columnDefinition = "TIMESTAMP")
@Column
@CreationTimestamp
private LocalDateTime testAt;
@Temporal(TemporalType.TIMESTAMP)
private Date testAt;
private Long lectureId;

View File

@ -14,6 +14,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -35,9 +36,10 @@ public class ReportSet {
)
private UUID id;
@Column(columnDefinition = "TIMESTAMP")
@Column
@CreationTimestamp
private LocalDateTime createAt;
@Temporal(TemporalType.TIMESTAMP)
private Date createAt;
@OneToMany(mappedBy = "reportSet", cascade = CascadeType.REMOVE)
private List<Report> reports;