| package com.example.myproject.entity; |
| |
| import javax.persistence.*; |
| import java.util.Date; |
| |
| @Entity |
| @Table(name = "friend_relation") |
| public class FriendRelation { |
| |
| @Id |
| @GeneratedValue(strategy = GenerationType.IDENTITY) |
| @Column(name = "relation_id") |
| private Long relationId; |
| |
| @Column(name = "user_id") |
| private Long userId; |
| |
| @Column(name = "friend_id") |
| private Long friendId; // 好友ID |
| |
| @Column(name = "create_time") |
| private Date createTime; // 好友关系创建时间 |
| |
| // Getters and Setters |
| public Long getRelationId() { |
| return relationId; |
| } |
| |
| public void setRelationId(Long relationId) { |
| this.relationId = relationId; |
| } |
| |
| public Long getUserId() { |
| return userId; |
| } |
| |
| public void setUserId(Long userId) { |
| this.userId = userId; |
| } |
| |
| public Long getFriendId() { |
| return friendId; |
| } |
| |
| public void setFriendId(Long friendId) { |
| this.friendId = friendId; |
| } |
| |
| public Date getCreateTime() { |
| return createTime; |
| } |
| |
| public void setCreateTime(Date createTime) { |
| this.createTime = createTime; |
| } |
| } |