diff --git a/src/main/java/com/example/just/Dto/PostPostDto.java b/src/main/java/com/example/just/Dto/PostPostDto.java new file mode 100644 index 00000000..a4d00c81 --- /dev/null +++ b/src/main/java/com/example/just/Dto/PostPostDto.java @@ -0,0 +1,49 @@ +package com.example.just.Dto; + +import com.example.just.Dao.Comment; +import com.example.just.Dao.Member; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; + +@Getter +@Setter +@NoArgsConstructor + +public class PostPostDto { + private String post_content; //글 내용 + + private String post_tag; //글 태그 + + private Long post_picture; + + @JsonIgnore + private Timestamp post_create_time; //글 생성 시간 + + private boolean secret; //글 공개 여부 + + + private String emoticon; //글 이모티콘 + + + private String post_category; //글 카테고리 + + @JsonIgnore + private List likedMembers = new ArrayList<>(); + + @JsonIgnore // Swagger에 postDto만 넘기려고 + private Member member; //글을쓴 Member_id + + @JsonIgnore + private List comments; + + + public boolean getSecret() { + return this.secret; + } +} diff --git a/src/main/java/com/example/just/Dto/PutPostDto.java b/src/main/java/com/example/just/Dto/PutPostDto.java new file mode 100644 index 00000000..3f138cce --- /dev/null +++ b/src/main/java/com/example/just/Dto/PutPostDto.java @@ -0,0 +1,54 @@ +package com.example.just.Dto; + +import com.example.just.Dao.Comment; +import com.example.just.Dao.Member; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; + +/* +// + */ +@Getter +@Setter +@NoArgsConstructor + +public class PutPostDto { + private Long post_id; + + private String post_content; //글 내용 + + private String post_tag; //글 태그 + + private Long post_picture; + + @JsonIgnore + private Timestamp post_create_time; //글 생성 시간 + + private boolean secret; //글 공개 여부 + + + private String emoticon; //글 이모티콘 + + + private String post_category; //글 카테고리 + + @JsonIgnore + private List likedMembers = new ArrayList<>(); + + @JsonIgnore // Swagger에 postDto만 넘기려고 + private Member member; //글을쓴 Member_id + + @JsonIgnore + private List comments; + + + public boolean getSecret() { + return this.secret; + } +}