package ovh.herisson.Clyde.Tables;

import jakarta.persistence.*;

@Entity
public class CurriculumCourse {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "Curriculum")
    private Curriculum curriculum;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "Course")
    private Course course;

    public CurriculumCourse(Curriculum curriculum, Course course){
        this.curriculum = curriculum;
        this.course = course;
    }

    public CurriculumCourse() {}

    public int getId() {
        return id;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course){
        this.course = course;
    }

    public Curriculum getCurriculum() {
        return curriculum;
    }

    public void setCurriculum(Curriculum curriculum) {
        this.curriculum = curriculum;
    }
}
