package com.plannaplan.entities; 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 com.plannaplan.types.GroupType; import com.plannaplan.types.WeekDay; @Entity public class Groups { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ManyToOne @JoinColumn(name = "course_id") private Course courseId; private int time; private String room; private int capacity; private GroupType type; private WeekDay day; @ManyToOne @JoinColumn(name = "lecturer_id") private Lecturer lecturer; public Groups() { } public Lecturer getLecturer() { return lecturer; } public void setLecturer(Lecturer lecturer) { this.lecturer = lecturer; } public WeekDay getDay() { return day; } public void setDay(WeekDay day) { this.day = day; } public GroupType getType() { return type; } public void setType(GroupType type) { this.type = type; } public int getCapacity() { return capacity; } public void setCapacity(int capacity) { this.capacity = capacity; } public String getRoom() { return room; } public void setRoom(String room) { this.room = room; } public int getTime() { return time; } public void setTime(int time) { this.time = time; } public Course getCourseId() { return courseId; } public void setCourseId(Course courseId) { this.courseId = courseId; } }