| 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; |
| } |
| } |