diff --git a/backend/src/main/java/aimo/backend/domains/member/controller/MemberController.java b/backend/src/main/java/aimo/backend/domains/member/controller/MemberController.java index 5028385..e247f49 100644 --- a/backend/src/main/java/aimo/backend/domains/member/controller/MemberController.java +++ b/backend/src/main/java/aimo/backend/domains/member/controller/MemberController.java @@ -25,8 +25,8 @@ import aimo.backend.domains.member.dto.request.UpdateNicknameRequest; import aimo.backend.domains.member.dto.request.UpdatePasswordRequest; import aimo.backend.infrastructure.s3.S3Service; -import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse; -import aimo.backend.infrastructure.s3.dto.SaveFileMetaDataRequest; +import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse; +import aimo.backend.infrastructure.s3.dto.request.SaveFileMetaDataRequest; import aimo.backend.domains.member.service.MemberService; import jakarta.mail.MessagingException; diff --git a/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java b/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java index c076ee2..e92d9f0 100644 --- a/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java +++ b/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java @@ -17,11 +17,10 @@ import aimo.backend.common.mapper.MemberMapper; import aimo.backend.domains.member.repository.MemberRepository; import aimo.backend.domains.member.repository.ProfileImageRepository; -import aimo.backend.domains.post.entity.Post; import aimo.backend.domains.post.service.PostService; import aimo.backend.domains.privatePost.dto.request.CreateResourceUrlRequest; import aimo.backend.infrastructure.s3.S3Service; -import aimo.backend.infrastructure.s3.dto.SaveFileMetaDataRequest; +import aimo.backend.infrastructure.s3.dto.request.SaveFileMetaDataRequest; import aimo.backend.infrastructure.s3.model.PresignedUrlPrefix; import aimo.backend.infrastructure.smtp.MailService; import aimo.backend.util.memberLoader.MemberLoader; @@ -33,7 +32,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/backend/src/main/java/aimo/backend/domains/post/dto/response/FindPostAndCommentsByIdResponse.java b/backend/src/main/java/aimo/backend/domains/post/dto/response/FindPostAndCommentsByIdResponse.java index b6a3150..c642ca9 100644 --- a/backend/src/main/java/aimo/backend/domains/post/dto/response/FindPostAndCommentsByIdResponse.java +++ b/backend/src/main/java/aimo/backend/domains/post/dto/response/FindPostAndCommentsByIdResponse.java @@ -3,6 +3,8 @@ import java.time.LocalDateTime; import java.util.List; +import com.fasterxml.jackson.annotation.JsonFormat; + import aimo.backend.domains.comment.entity.ParentComment; import aimo.backend.domains.member.entity.Member; import lombok.AccessLevel; @@ -37,6 +39,7 @@ public static class ParentCommentDto { private final String content; private final String nickname; private final Integer likesCount; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private final LocalDateTime createdAt; private final List childComments; @@ -75,6 +78,7 @@ private static class ChildCommentDto { private final String content; private final String nickname; private final Integer likesCount; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private final LocalDateTime createdAt; } } diff --git a/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java b/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java index ffff421..16a04c5 100644 --- a/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java +++ b/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java @@ -34,8 +34,8 @@ import aimo.backend.domains.privatePost.service.ChatRecordService; import aimo.backend.domains.privatePost.service.PrivatePostService; -import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlRequest; -import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse; +import aimo.backend.infrastructure.s3.dto.request.CreatePresignedUrlRequest; +import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse; import jakarta.validation.Valid; import aimo.backend.domains.privatePost.service.TextRecordService; diff --git a/backend/src/main/java/aimo/backend/domains/privatePost/service/AudioRecordService.java b/backend/src/main/java/aimo/backend/domains/privatePost/service/AudioRecordService.java index e0fcd3d..da354e0 100644 --- a/backend/src/main/java/aimo/backend/domains/privatePost/service/AudioRecordService.java +++ b/backend/src/main/java/aimo/backend/domains/privatePost/service/AudioRecordService.java @@ -17,8 +17,8 @@ import aimo.backend.domains.privatePost.entity.AudioRecord; import aimo.backend.domains.privatePost.repository.AudioRecordRepository; import aimo.backend.infrastructure.s3.S3Service; -import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlRequest; -import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse; +import aimo.backend.infrastructure.s3.dto.request.CreatePresignedUrlRequest; +import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse; import lombok.RequiredArgsConstructor; @Service diff --git a/backend/src/main/java/aimo/backend/infrastructure/s3/S3Service.java b/backend/src/main/java/aimo/backend/infrastructure/s3/S3Service.java index 857935b..4d07f86 100644 --- a/backend/src/main/java/aimo/backend/infrastructure/s3/S3Service.java +++ b/backend/src/main/java/aimo/backend/infrastructure/s3/S3Service.java @@ -15,8 +15,8 @@ import aimo.backend.common.properties.S3Properties; import aimo.backend.domains.member.dto.request.CreateProfileImageUrlRequest; import aimo.backend.domains.privatePost.dto.request.CreateResourceUrlRequest; -import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlRequest; -import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse; +import aimo.backend.infrastructure.s3.dto.request.CreatePresignedUrlRequest; +import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse; import aimo.backend.infrastructure.s3.model.PresignedUrlPrefix; import lombok.RequiredArgsConstructor; diff --git a/backend/src/main/java/aimo/backend/infrastructure/s3/dto/CreatePresignedUrlRequest.java b/backend/src/main/java/aimo/backend/infrastructure/s3/dto/CreatePresignedUrlRequest.java deleted file mode 100644 index d90337d..0000000 --- a/backend/src/main/java/aimo/backend/infrastructure/s3/dto/CreatePresignedUrlRequest.java +++ /dev/null @@ -1,8 +0,0 @@ -package aimo.backend.infrastructure.s3.dto; - -import aimo.backend.util.validator.ValidFileExtension; - -public record CreatePresignedUrlRequest( - String filename -) { -} diff --git a/backend/src/main/java/aimo/backend/infrastructure/s3/dto/request/CreatePresignedUrlRequest.java b/backend/src/main/java/aimo/backend/infrastructure/s3/dto/request/CreatePresignedUrlRequest.java new file mode 100644 index 0000000..462231d --- /dev/null +++ b/backend/src/main/java/aimo/backend/infrastructure/s3/dto/request/CreatePresignedUrlRequest.java @@ -0,0 +1,6 @@ +package aimo.backend.infrastructure.s3.dto.request; + +public record CreatePresignedUrlRequest( + String filename +) { +} diff --git a/backend/src/main/java/aimo/backend/infrastructure/s3/dto/SaveFileMetaDataRequest.java b/backend/src/main/java/aimo/backend/infrastructure/s3/dto/request/SaveFileMetaDataRequest.java similarity index 85% rename from backend/src/main/java/aimo/backend/infrastructure/s3/dto/SaveFileMetaDataRequest.java rename to backend/src/main/java/aimo/backend/infrastructure/s3/dto/request/SaveFileMetaDataRequest.java index 268c79a..7c3e6e9 100644 --- a/backend/src/main/java/aimo/backend/infrastructure/s3/dto/SaveFileMetaDataRequest.java +++ b/backend/src/main/java/aimo/backend/infrastructure/s3/dto/request/SaveFileMetaDataRequest.java @@ -1,4 +1,4 @@ -package aimo.backend.infrastructure.s3.dto; +package aimo.backend.infrastructure.s3.dto.request; import jakarta.validation.constraints.NotNull; diff --git a/backend/src/main/java/aimo/backend/infrastructure/s3/dto/CreatePresignedUrlResponse.java b/backend/src/main/java/aimo/backend/infrastructure/s3/dto/response/CreatePresignedUrlResponse.java similarity index 62% rename from backend/src/main/java/aimo/backend/infrastructure/s3/dto/CreatePresignedUrlResponse.java rename to backend/src/main/java/aimo/backend/infrastructure/s3/dto/response/CreatePresignedUrlResponse.java index 9f5a5b4..0546274 100644 --- a/backend/src/main/java/aimo/backend/infrastructure/s3/dto/CreatePresignedUrlResponse.java +++ b/backend/src/main/java/aimo/backend/infrastructure/s3/dto/response/CreatePresignedUrlResponse.java @@ -1,4 +1,4 @@ -package aimo.backend.infrastructure.s3.dto; +package aimo.backend.infrastructure.s3.dto.response; public record CreatePresignedUrlResponse( String presignedUrl,