database
This commit is contained in:
parent
f919d1db7c
commit
522732ceee
2 changed files with 23 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
||||||
|
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) protected Long id;
|
||||||
|
public String name;
|
||||||
|
public @ElementCollection @CollectionTable(name = "course_model_tags") List<String> tag;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package fr.epita.assistants.data.model;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name="student_model")
|
||||||
|
public class StudentModel {
|
||||||
|
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) protected Long id;
|
||||||
|
public String name;
|
||||||
|
@ManyToOne @JoinColumn(name="course_id") CourseModel courseModel;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue