Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.demo;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- import javax.persistence.JoinColumn;
- import javax.persistence.ManyToOne;
- import javax.persistence.Table;
- @Entity
- @Table(name = "groups")
- public class Group {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private int id;
- @Column(name = "group_name")
- private String groupName;
- public Group() {}
- public Group(int id, String groupName) {
- this.id = id;
- this.groupName = groupName;
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getGroupName() {
- return groupName;
- }
- public void setGroupName(String groupName) {
- this.groupName = groupName;
- }
- }
Add Comment
Please, Sign In to add comment