blob: c0860018abebb8732c2f26eb6eccd3e8b7db211b [file] [log] [blame]
22301138f6824512025-06-04 02:03:13 +08001package com.example.myproject.entity;
2
3import javax.persistence.*;
4import java.util.Date;
5
6@Entity
7@Table(name = "friend_relation")
8public class FriendRelation {
9
10 @Id
11 @GeneratedValue(strategy = GenerationType.IDENTITY)
12 @Column(name = "relation_id")
13 private Long relationId;
14
15 @Column(name = "user_id")
16 private Long userId;
17
18 @Column(name = "friend_id")
19 private Long friendId; // 好友ID
20
21 @Column(name = "create_time")
22 private Date createTime; // 好友关系创建时间
23
24 // Getters and Setters
25 public Long getRelationId() {
26 return relationId;
27 }
28
29 public void setRelationId(Long relationId) {
30 this.relationId = relationId;
31 }
32
33 public Long getUserId() {
34 return userId;
35 }
36
37 public void setUserId(Long userId) {
38 this.userId = userId;
39 }
40
41 public Long getFriendId() {
42 return friendId;
43 }
44
45 public void setFriendId(Long friendId) {
46 this.friendId = friendId;
47 }
48
49 public Date getCreateTime() {
50 return createTime;
51 }
52
53 public void setCreateTime(Date createTime) {
54 this.createTime = createTime;
55 }
56}