wuchimedes | e5722e3 | 2025-04-13 17:38:50 +0800 | [diff] [blame^] | 1 | package com.example.g8backend.entity; |
| 2 | |
| 3 | import com.baomidou.mybatisplus.annotation.IdType; |
| 4 | import com.baomidou.mybatisplus.annotation.TableId; |
| 5 | import com.baomidou.mybatisplus.annotation.TableName; |
| 6 | |
| 7 | import java.sql.Timestamp; |
| 8 | import lombok.Data; |
| 9 | |
| 10 | @Data |
| 11 | @TableName("posts") |
| 12 | public 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 | } |