package com.plannaplan.entities; import java.util.ArrayList; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; @Entity public class Course { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; private String symbol; @OneToMany(mappedBy = "id") private List groups = new ArrayList<>(); public Course() { } public String getName() { return name; } public String getSymbol() { return symbol; } public void setSymbol(String symbol) { this.symbol = symbol; } public void setName(String name) { this.name = name; } }