feat : BoardSummaryDto create time 추가
This commit is contained in:
parent
cebabf77c3
commit
97a69ae3af
@ -2,7 +2,9 @@ package com.edufocus.edufocus;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||
|
||||
@EnableJpaAuditing
|
||||
@SpringBootApplication
|
||||
public class EdufocusApplication {
|
||||
|
||||
|
@ -5,7 +5,7 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
@ -17,6 +17,6 @@ public class ResponseBoardDetailDto {
|
||||
private String title;
|
||||
private String content;
|
||||
private int viewCount;
|
||||
private LocalTime createdAt;
|
||||
private LocalTime modifiedAt;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime modifiedAt;
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
@Setter
|
||||
@ -12,4 +14,5 @@ public class ResponseBoardSummaryDto {
|
||||
private long id;
|
||||
private String name;
|
||||
private String title;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Builder
|
||||
@ -13,6 +14,6 @@ public class ResponseCommentDto {
|
||||
private long id;
|
||||
private String name;
|
||||
private String content;
|
||||
private LocalTime createAt;
|
||||
private LocalTime modifiedAt;
|
||||
private LocalDateTime createAt;
|
||||
private LocalDateTime modifiedAt;
|
||||
}
|
||||
|
@ -8,8 +8,11 @@ import com.edufocus.edufocus.user.model.entity.User;
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
@ -18,6 +21,7 @@ import java.util.List;
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Setter
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
|
||||
public class Board {
|
||||
|
||||
@ -37,11 +41,11 @@ public class Board {
|
||||
@Column(nullable = true)
|
||||
private int viewCount;
|
||||
|
||||
@CreationTimestamp
|
||||
LocalTime createdAt;
|
||||
@CreatedDate
|
||||
LocalDateTime createdAt;
|
||||
|
||||
@CreationTimestamp
|
||||
LocalTime modifiedAt;
|
||||
@LastModifiedDate
|
||||
LocalDateTime modifiedAt;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "user_id")
|
||||
@ -60,6 +64,7 @@ public class Board {
|
||||
.id(id)
|
||||
.title(title)
|
||||
.name(user.getUserId())
|
||||
.createdAt(createdAt)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Builder
|
||||
@ -26,10 +26,10 @@ public class Comment {
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
private LocalTime createdAt;
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@Column
|
||||
private LocalTime modifiedAt;
|
||||
private LocalDateTime modifiedAt;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
|
@ -2,13 +2,15 @@ spring.application.name=edufocus
|
||||
server.port=8080
|
||||
|
||||
server.ssl.enabled=false
|
||||
server.servlet.context-path=${CONTEXT_PATH}
|
||||
|
||||
|
||||
# LiveKit configuration
|
||||
livekit.api.key=${LIVEKIT_API_KEY:devkey}
|
||||
livekit.api.secret=${LIVEKIT_API_SECRET:secret}
|
||||
# JWT Salt (??? ?? ???? ???)
|
||||
|
||||
jwt.salt=ssafy-screte-key-20240404-ssafy-screte-key-20240404-ssafy-screte-key-20240404
|
||||
jwt.salt=${SALT}
|
||||
|
||||
# Access Token ?? ?? (??? ??)
|
||||
jwt.access-token.expiretime=3600000
|
||||
@ -16,11 +18,24 @@ jwt.access-token.expiretime=3600000
|
||||
# Refresh Token ?? ?? (??? ??)
|
||||
jwt.refresh-token.expiretime=86400000
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/edufocus?useSSL=false
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
||||
spring.datasource.url=${DATA_SOURCE_URL}
|
||||
spring.datasource.username=${USER_NAME}
|
||||
spring.datasource.password=${USER_PASSWORD}
|
||||
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
|
||||
|
||||
spring.jpa.database=mysql
|
||||
spring.jpa.hibernate.ddl-auto=create
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.show-sql=true
|
||||
|
||||
|
||||
|
||||
|
||||
spring.mail.host=smtp.gmail.com
|
||||
spring.mail.port=587
|
||||
#spring.mail.username=ssafytestpjt
|
||||
#spring.mail.password=trpjbxqialufuzih
|
||||
spring.mail.username=passfinder111@gmail.com
|
||||
spring.mail.password=mnlyfkiprltjlsmw
|
||||
|
||||
spring.mail.properties.mail.smtp.auth=true
|
||||
spring.mail.properties.mail.smtp.starttls.enable=true
|
Loading…
Reference in New Issue
Block a user