Spaces:
Sleeping
Sleeping
| package com.krishna.model; | |
| import jakarta.persistence.*; | |
| import java.util.UUID; | |
| public class CommentModel { | |
| private Long id; | |
| private String content; | |
| private UserModel user; | |
| private PostModel post; | |
| // Constructors | |
| public CommentModel() {} | |
| public CommentModel(String content, UserModel user, PostModel post) { | |
| this.content = content; | |
| this.user = user; | |
| this.post = post; | |
| } | |
| // Getters and Setters | |
| public Long getId() { return id; } | |
| public void setId(Long id) { this.id = id; } | |
| public String getContent() { return content; } | |
| public void setContent(String content) { this.content = content; } | |
| public UserModel getUser() { return user; } | |
| public void setUser(UserModel user) { this.user = user; } | |
| public PostModel getPost() { return post; } | |
| public void setPost(PostModel post) { this.post = post; } | |
| } | |