source: src/main/java/project/educatum/model/relations/TeacherStudentRelation.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: 1.2 KB
Line 
1package project.educatum.model.relations;
2
3import lombok.Data;
4import project.educatum.model.primarykeys.TeacherStudentRelationID;
5
6import javax.persistence.Column;
7import javax.persistence.EmbeddedId;
8import javax.persistence.Entity;
9import javax.persistence.Table;
10
11@Data
12@Entity
13@Table(name = "predava_na", schema = "project")
14public class TeacherStudentRelation {
15
16 @EmbeddedId
17 private TeacherStudentRelationID id;
18
19 @Column(name = "cena_po_cas", nullable = false)
20 private Integer priceByClass;
21
22 @Column(name = "broj_casovi_po_dogovor", nullable = false)
23 private Integer numScheduledClasses;
24
25 @Column(name = "rejting")
26 private Float rating;
27
28 @Column(name = "komentar")
29 private String comment;
30
31 @Column(name = "hasrated")
32 private boolean hasRated;
33
34
35 public TeacherStudentRelation() {
36 }
37
38 public TeacherStudentRelation(TeacherStudentRelationID id, Integer priceByClass, Integer numScheduledClasses) {
39 this.hasRated = false;
40 this.rating = Float.valueOf(0);
41 this.id = id;
42 this.priceByClass = priceByClass;
43 this.numScheduledClasses = numScheduledClasses;
44 }
45
46 public boolean hasRated(){
47 return hasRated;
48 }
49}
Note: See TracBrowser for help on using the repository browser.