22301138 | f682451 | 2025-06-04 02:03:13 +0800 | [diff] [blame^] | 1 | package com.example.myproject.entity; |
| 2 | |
| 3 | import javax.persistence.*; |
| 4 | |
| 5 | @Entity |
| 6 | @Table(name = "group_members") |
| 7 | public class GroupMembers { |
| 8 | |
| 9 | @Id |
| 10 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 11 | @Column(name = "relation_id") |
| 12 | private Long relationId; |
| 13 | |
| 14 | @Column(name = "group_id", nullable = false) |
| 15 | private Long groupId; |
| 16 | |
| 17 | @Column(name = "user_id", nullable = false) |
| 18 | private Long userId; |
| 19 | |
| 20 | // Getters and Setters |
| 21 | public Long getRelationId() { |
| 22 | return relationId; |
| 23 | } |
| 24 | |
| 25 | public void setRelationId(Long relationId) { |
| 26 | this.relationId = relationId; |
| 27 | } |
| 28 | |
| 29 | public Long getGroupId() { |
| 30 | return groupId; |
| 31 | } |
| 32 | |
| 33 | public void setGroupId(Long groupId) { |
| 34 | this.groupId = groupId; |
| 35 | } |
| 36 | |
| 37 | public Long getUserId() { |
| 38 | return userId; |
| 39 | } |
| 40 | |
| 41 | public void setUserId(Long userId) { |
| 42 | this.userId = userId; |
| 43 | } |
| 44 | } |