22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame^] | 1 | package com.example.myproject.entity; |
| 2 | |
| 3 | import javax.persistence.*; |
| 4 | import java.util.Date; |
| 5 | |
| 6 | @Entity |
| 7 | @Table(name = "follow") |
| 8 | public class UserFollow { |
| 9 | |
| 10 | @Id |
| 11 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 12 | @Column(name = "record_id") |
| 13 | private Long recordId; |
| 14 | |
| 15 | @Column(name = "follower_id") |
| 16 | private Long followerId; |
| 17 | |
| 18 | @Column(name = "followed_id") |
| 19 | private Long followedId; |
| 20 | |
| 21 | @Column(name = "follow_time") |
| 22 | private Date followTime; |
| 23 | |
| 24 | // Getters and Setters |
| 25 | public Long getId() { |
| 26 | return recordId; |
| 27 | } |
| 28 | |
| 29 | public void setId(Long recordId) { |
| 30 | this.recordId = recordId; |
| 31 | } |
| 32 | |
| 33 | public Long getFollowerId() { |
| 34 | return followerId; |
| 35 | } |
| 36 | |
| 37 | public void setFollowerId(Long followerId) { |
| 38 | this.followerId = followerId; |
| 39 | } |
| 40 | |
| 41 | public Long getFollowedId() { |
| 42 | return followedId; |
| 43 | } |
| 44 | |
| 45 | public void setFollowedId(Long followedId) { |
| 46 | this.followedId = followedId; |
| 47 | } |
| 48 | |
| 49 | public Date getFollowTime() { |
| 50 | return followTime; |
| 51 | } |
| 52 | |
| 53 | public void setFollowTime(Date followTime) { |
| 54 | this.followTime = followTime; |
| 55 | } |
| 56 | } |