blob: 4be02618f7f0ae20377eb814e822f63c570c3887 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package fr.epita.assistants.data.model;
import jakarta.persistence.*;
import java.util.List;
@Entity
@Table(name = "course_model")
public class CourseModel {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
public long id;
public String name;
@ElementCollection @CollectionTable(name = "course_model_tags", joinColumns = @JoinColumn(name = "course_id"))
public List<String> tag;
@OneToMany(mappedBy = "courseModel")
public List<StudentModel> students;
}
|