用户,社交接口
Change-Id: I10d13773cbe4bbcf3b69a2038cdf7aa9ba54b6df
diff --git a/src/main/java/com/example/myproject/entity/Post.java b/src/main/java/com/example/myproject/entity/Post.java
new file mode 100644
index 0000000..bb94aac
--- /dev/null
+++ b/src/main/java/com/example/myproject/entity/Post.java
@@ -0,0 +1,116 @@
+package com.example.myproject.entity;
+
+import com.fasterxml.jackson.annotation.JsonManagedReference;
+
+import javax.persistence.*;
+
+import java.util.Date;
+import java.util.List;
+
+@Entity
+@Table(name = "post")
+public class Post {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "postNo")
+ private Long postNo;
+
+
+ @Column(name = "userId")
+ private Long user_id;
+
+ @Column(name = "postContent")
+ private String postContent;
+
+ @Column(name = "imageUrl")
+ private String imageUrl;
+
+ @Column(name = "postTime")
+ private Date postTime;
+
+ @Column(name = "postLikeNum")
+ private Integer postLikeNum;
+
+ @Column(name = "postCollectNum")
+ private Integer postCollectNum;
+
+ @Column(name = "title")
+ private String title;
+
+ @Column(name = "postType")
+ private String postType;
+
+ // Getters and Setters
+ public Long getPostNo() {
+ return postNo;
+ }
+
+ public void setPostNo(Long postNo) {
+ this.postNo = postNo;
+ }
+
+ public Long getUser_id() {
+ return user_id;
+ }
+
+ public void setUser_id(Long user) {
+ this.user_id = user;
+ }
+
+ public String getPostContent() {
+ return postContent;
+ }
+
+ public void setPostContent(String postContent) {
+ this.postContent = postContent;
+ }
+
+ public String getImageUrl() {
+ return imageUrl;
+ }
+
+ public void setImageUrl(String imgUrl) {
+ this.imageUrl = imgUrl;
+ }
+
+ public Date getPostTime() {
+ return postTime;
+ }
+
+ public void setPostTime(Date postTime) {
+ this.postTime = postTime;
+ }
+
+ public Integer getPostLikeNum() {
+ return postLikeNum;
+ }
+
+ public void setPostLikeNum(Integer postLikeNum) {
+ this.postLikeNum = postLikeNum;
+ }
+
+ public Integer getPostCollectNum() {
+ return postCollectNum;
+ }
+
+ public void setPostCollectNum(Integer postCollectNum) {
+ this.postCollectNum = postCollectNum;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getPostType() {
+ return postType;
+ }
+
+ public void setPostType(String postType) {
+ this.postType = postType;
+ }
+}