PLZ FIX Reviewed-on: PGL/Clyde#129 Reviewed-by: Wal <karpinskiwal@gmail.com> Reviewed-by: Debucquoy Anthony <d.tonitch@gmail.com> Co-authored-by: Bartha Maxime <231026@umons.ac.be> Co-committed-by: Bartha Maxime <231026@umons.ac.be>
48 lines
850 B
Java
48 lines
850 B
Java
package ovh.herisson.Clyde.Tables;
|
|
|
|
import jakarta.persistence.*;
|
|
|
|
@Entity
|
|
public class TeacherCourse {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
|
private int id;
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
@JoinColumn(name = "Users")
|
|
private User user;
|
|
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
@JoinColumn(name = "Course")
|
|
private Course course;
|
|
|
|
public TeacherCourse(User user, Course course){
|
|
this.user = user;
|
|
this.course = course;
|
|
}
|
|
|
|
public TeacherCourse() {}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public User getUser() {
|
|
return user;
|
|
}
|
|
|
|
public void setUser(User user) {
|
|
this.user = user;
|
|
}
|
|
|
|
public Course getCourse() {
|
|
return course;
|
|
}
|
|
|
|
public void setCourse(Course course) {
|
|
this.course = course;
|
|
}
|
|
|
|
}
|