| package com.example.myproject.entity; |
| |
| import javax.persistence.*; |
| |
| @Entity |
| @Table(name = "group_members") |
| public class GroupMembers { |
| |
| @Id |
| @GeneratedValue(strategy = GenerationType.IDENTITY) |
| @Column(name = "relation_id") |
| private Long relationId; |
| |
| @Column(name = "group_id", nullable = false) |
| private Long groupId; |
| |
| @Column(name = "user_id", nullable = false) |
| private Long userId; |
| |
| // Getters and Setters |
| public Long getRelationId() { |
| return relationId; |
| } |
| |
| public void setRelationId(Long relationId) { |
| this.relationId = relationId; |
| } |
| |
| public Long getGroupId() { |
| return groupId; |
| } |
| |
| public void setGroupId(Long groupId) { |
| this.groupId = groupId; |
| } |
| |
| public Long getUserId() { |
| return userId; |
| } |
| |
| public void setUserId(Long userId) { |
| this.userId = userId; |
| } |
| } |