package com.example.g8backend.entity; | |
import com.baomidou.mybatisplus.annotation.IdType; | |
import com.baomidou.mybatisplus.annotation.TableId; | |
import com.baomidou.mybatisplus.annotation.TableName; | |
import java.sql.Timestamp; | |
import lombok.Data; | |
@Data | |
@TableName("posts") | |
public class Post { | |
@TableId(type = IdType.AUTO) | |
private Long postId; | |
private Long userId; | |
private String postTitle; | |
private String postContent; | |
private Timestamp createdAt; | |
private String postType; | |
@Override | |
public String toString() { | |
return "Post{" + | |
"postId=" + postId + | |
", userId=" + userId + | |
", postTitle='" + postTitle + '\'' + | |
", postContent='" + postContent + '\'' + | |
", createdAt=" + createdAt + | |
", postType='" + postType + '\'' + | |
'}'; | |
} | |
} |