source: src/main/java/project/educatum/model/Homework.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: 902 bytes
Line 
1package project.educatum.model;
2
3import lombok.Data;
4import project.educatum.model.relations.StudentHomeworkRelation;
5
6import javax.persistence.*;
7
8@Data
9@Entity
10@Table(name = "domasni_zadaci", schema = "project")
11public class Homework {
12 @Id
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Column(name = "id_domasno", nullable = false)
15 private Integer id;
16
17 @Column(name = "opis", length = 500)
18 private String description;
19
20 @ManyToOne(optional = false)
21 @JoinColumn(name = "id_nastavnik", nullable = false)
22 private Teacher idTeacher;
23
24 @ManyToOne(optional = false)
25 @JoinColumn(name = "id_cas", nullable = false)
26 private Class idCas;
27
28
29 public Homework(String description, Teacher idTeacher, Class idCas) {
30 this.description = description;
31 this.idTeacher = idTeacher;
32 this.idCas = idCas;
33 }
34
35 public Homework() {
36 }
37
38}
Note: See TracBrowser for help on using the repository browser.