Spaces:
Sleeping
Sleeping
| package com.krishna.model; | |
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
| import jakarta.persistence.*; | |
| import org.hibernate.annotations.CreationTimestamp; | |
| import org.hibernate.annotations.UpdateTimestamp; | |
| import java.time.LocalDateTime; | |
| public class PostModel { | |
| private Long id; | |
| private UserModel userModel; | |
| private String content; | |
| private String imageUrl; | |
| private LocalDateTime createdAt; | |
| private LocalDateTime updatedAt; | |
| // Getters and setters | |
| public Long getId() { return id; } | |
| public void setId(Long id) { this.id = id; } | |
| public UserModel getUserModel() { return userModel; } | |
| public void setUserModel(UserModel userModel) { this.userModel = userModel; } | |
| public String getContent() { return content; } | |
| public void setContent(String content) { this.content = content; } | |
| public String getImageUrl() { return imageUrl; } | |
| public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } | |
| public LocalDateTime getCreatedAt() { return createdAt; } | |
| public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; } | |
| public LocalDateTime getUpdatedAt() { return updatedAt; } | |
| public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; } | |
| } | |