source: src/main/java/project/educatum/model/Qualification.java

Last change on this file was d3cf3a1, checked in by Marija Micevska <marija_micevska@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 873 bytes
Line 
1package project.educatum.model;
2
3import lombok.Data;
4
5import javax.persistence.*;
6
7@Data
8@Entity
9@Table(name = "kvalifikacii", schema = "project")
10
11public class Qualification {
12
13 @Id
14 @GeneratedValue(strategy = GenerationType.IDENTITY)
15 @Column(name = "id_kvalifikacija", nullable = false)
16 private Integer id;
17
18
19 @Column(name = "dokument", columnDefinition = "TEXT")
20 private String document;
21
22 @ManyToOne(optional = false)
23 @JoinColumn(name = "id_nastavnik", nullable = false)
24 private Teacher idTeacher;
25
26 @ManyToOne(optional = false)
27 @JoinColumn(name = "id_admin", nullable = false)
28 private Admin idAdmin;
29
30 public Qualification() {
31 }
32
33 public Qualification(String document, Teacher idTeacher, Admin idAdmin) {
34 this.document = document;
35 this.idTeacher = idTeacher;
36 this.idAdmin = idAdmin;
37 }
38
39}
Note: See TracBrowser for help on using the repository browser.