diff --git a/src/main/java/org/bssm/attachit/domain/attachment/domain/Attachment.java b/src/main/java/org/bssm/attachit/domain/attachment/domain/Attachment.java index ee0196f..b455cc9 100644 --- a/src/main/java/org/bssm/attachit/domain/attachment/domain/Attachment.java +++ b/src/main/java/org/bssm/attachit/domain/attachment/domain/Attachment.java @@ -2,6 +2,7 @@ import jakarta.persistence.*; import lombok.*; +import org.bssm.attachit.domain.attachment.domain.type.PostType; import org.bssm.attachit.domain.user.domain.User; @Entity @@ -20,6 +21,21 @@ public class Attachment { @Column private String path; + @Column + private Long colorCode; + + @Column + private Long zIndex; + + @Column + private PostType postType; + + @Column + private String xPosition; + + @Column + private String yPosition; + @ManyToOne @JoinColumn(name = "user_id") private User user; diff --git a/src/main/java/org/bssm/attachit/domain/attachment/domain/type/PostType.java b/src/main/java/org/bssm/attachit/domain/attachment/domain/type/PostType.java new file mode 100644 index 0000000..7d13a55 --- /dev/null +++ b/src/main/java/org/bssm/attachit/domain/attachment/domain/type/PostType.java @@ -0,0 +1,5 @@ +package org.bssm.attachit.domain.attachment.domain.type; + +public enum PostType { + FILE, TEXT +} diff --git a/src/main/java/org/bssm/attachit/domain/attachment/presentation/dto/request/PostAttachmentRequest.java b/src/main/java/org/bssm/attachit/domain/attachment/presentation/dto/request/PostAttachmentRequest.java index 7544ab3..53394ad 100644 --- a/src/main/java/org/bssm/attachit/domain/attachment/presentation/dto/request/PostAttachmentRequest.java +++ b/src/main/java/org/bssm/attachit/domain/attachment/presentation/dto/request/PostAttachmentRequest.java @@ -1,8 +1,14 @@ package org.bssm.attachit.domain.attachment.presentation.dto.request; import lombok.Getter; +import org.bssm.attachit.domain.attachment.domain.type.PostType; @Getter public class PostAttachmentRequest { private String content; + private Long colorCode; + private Long zIndex; + private PostType postType; + private String xPosition; + private String yPosition; } diff --git a/src/main/java/org/bssm/attachit/domain/attachment/service/PostAttachmentService.java b/src/main/java/org/bssm/attachit/domain/attachment/service/PostAttachmentService.java index 1c9c80a..864f4b9 100644 --- a/src/main/java/org/bssm/attachit/domain/attachment/service/PostAttachmentService.java +++ b/src/main/java/org/bssm/attachit/domain/attachment/service/PostAttachmentService.java @@ -39,6 +39,11 @@ public ResponseEntity execute(PostAttachmentRequest request, MultipartFi .path(path) .content(request.getContent()) .user(user) + .colorCode(request.getColorCode()) + .zIndex(request.getZIndex()) + .postType(request.getPostType()) + .xPosition(request.getXPosition()) + .yPosition(request.getYPosition()) .build() ); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f8fa750..5c92db6 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -10,9 +10,9 @@ spring: max-file-size: 20MB jpa: - show-sql: false + show-sql: true hibernate: - ddl-auto: update + ddl-auto: create open-in-view: false