blob: ac7ff206084c144e2260297f39712569b34de5ea [file] [log] [blame]
wuchimedese5722e32025-04-13 17:38:50 +08001package com.example.g8backend.entity;
2
3import com.baomidou.mybatisplus.annotation.IdType;
4import com.baomidou.mybatisplus.annotation.TableId;
5import com.baomidou.mybatisplus.annotation.TableName;
6
7import java.sql.Timestamp;
8import lombok.Data;
9
10@Data
11@TableName("posts")
12public class Post {
13 @TableId(type = IdType.AUTO)
14 private Long postId;
15
16 private Long userId;
17 private String postTitle;
18 private String postContent;
19 private Timestamp createdAt;
20 private String postType;
21
22 @Override
23 public String toString() {
24 return "Post{" +
25 "postId=" + postId +
26 ", userId=" + userId +
27 ", postTitle='" + postTitle + '\'' +
28 ", postContent='" + postContent + '\'' +
29 ", createdAt=" + createdAt +
30 ", postType='" + postType + '\'' +
31 '}';
32 }
33}