Skip to content

Commit

Permalink
refactor : Attachment info add
Browse files Browse the repository at this point in the history
  • Loading branch information
NameIsUser06 committed Dec 27, 2023
1 parent 3d4c268 commit ccc4d4c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.bssm.attachit.domain.attachment.domain.type;

public enum PostType {
FILE, TEXT
}
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public ResponseEntity<String> 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()
);

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit ccc4d4c

Please sign in to comment.