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