package ovh.herisson.Clyde.Tables;

import jakarta.persistence.*;

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

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "Cursus")
    private Cursus cursus;

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

    public CursusCourse(Cursus cursus, Course course){
        this.cursus = cursus;
        this.course = course;
    }

    public CursusCourse() {}

    public int getId() {
        return id;
    }

    public Course getCourse() {
        return course;
    }

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

    public Cursus getCursus() {
        return cursus;
    }

    public void setCursus(Cursus cursus) {
        this.cursus = cursus;
    }
}
