Skip to content

Commit ccc4d4c

Browse files
committed
refactor : Attachment info add
1 parent 3d4c268 commit ccc4d4c

File tree

5 files changed

+34
-2
lines changed

5 files changed

+34
-2
lines changed

src/main/java/org/bssm/attachit/domain/attachment/domain/Attachment.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import jakarta.persistence.*;
44
import lombok.*;
5+
import org.bssm.attachit.domain.attachment.domain.type.PostType;
56
import org.bssm.attachit.domain.user.domain.User;
67

78
@Entity
@@ -20,6 +21,21 @@ public class Attachment {
2021
@Column
2122
private String path;
2223

24+
@Column
25+
private Long colorCode;
26+
27+
@Column
28+
private Long zIndex;
29+
30+
@Column
31+
private PostType postType;
32+
33+
@Column
34+
private String xPosition;
35+
36+
@Column
37+
private String yPosition;
38+
2339
@ManyToOne
2440
@JoinColumn(name = "user_id")
2541
private User user;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.bssm.attachit.domain.attachment.domain.type;
2+
3+
public enum PostType {
4+
FILE, TEXT
5+
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
package org.bssm.attachit.domain.attachment.presentation.dto.request;
22

33
import lombok.Getter;
4+
import org.bssm.attachit.domain.attachment.domain.type.PostType;
45

56
@Getter
67
public class PostAttachmentRequest {
78
private String content;
9+
private Long colorCode;
10+
private Long zIndex;
11+
private PostType postType;
12+
private String xPosition;
13+
private String yPosition;
814
}

src/main/java/org/bssm/attachit/domain/attachment/service/PostAttachmentService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ public ResponseEntity<String> execute(PostAttachmentRequest request, MultipartFi
3939
.path(path)
4040
.content(request.getContent())
4141
.user(user)
42+
.colorCode(request.getColorCode())
43+
.zIndex(request.getZIndex())
44+
.postType(request.getPostType())
45+
.xPosition(request.getXPosition())
46+
.yPosition(request.getYPosition())
4247
.build()
4348
);
4449

src/main/resources/application.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ spring:
1010
max-file-size: 20MB
1111

1212
jpa:
13-
show-sql: false
13+
show-sql: true
1414
hibernate:
15-
ddl-auto: update
15+
ddl-auto: create
1616
open-in-view: false
1717

1818

0 commit comments

Comments
 (0)