47 lines
962 B
Java
47 lines
962 B
Java
package ovh.herisson.Clyde.Tables;
|
|
|
|
import jakarta.persistence.*;
|
|
|
|
@Entity
|
|
public class UserCurriculum {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
|
private int id;
|
|
|
|
//Un étudiant peut avoir plusieurs curriculums
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
@JoinColumn(name = "Users")
|
|
private User user;
|
|
|
|
@OneToOne(fetch = FetchType.EAGER)
|
|
@JoinColumn(name = "Curriculum")
|
|
private Curriculum curriculum;
|
|
|
|
public UserCurriculum(User user, Curriculum curriculum){
|
|
this.user = user;
|
|
this.curriculum = curriculum;
|
|
}
|
|
|
|
public UserCurriculum() {}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public User getUser() {
|
|
return user;
|
|
}
|
|
|
|
public void setUser(User user) {
|
|
this.user = user;
|
|
}
|
|
|
|
public Curriculum getCurriculum() {
|
|
return curriculum;
|
|
}
|
|
|
|
public void setCurriculum(Curriculum curriculum) {
|
|
this.curriculum = curriculum;
|
|
}
|
|
}
|