[d3cf3a1] | 1 | package project.educatum.model.relations;
|
---|
| 2 |
|
---|
| 3 | import lombok.Data;
|
---|
| 4 | import project.educatum.model.primarykeys.TeacherStudentRelationID;
|
---|
| 5 |
|
---|
| 6 | import javax.persistence.Column;
|
---|
| 7 | import javax.persistence.EmbeddedId;
|
---|
| 8 | import javax.persistence.Entity;
|
---|
| 9 | import javax.persistence.Table;
|
---|
| 10 |
|
---|
| 11 | @Data
|
---|
| 12 | @Entity
|
---|
| 13 | @Table(name = "predava_na", schema = "project")
|
---|
| 14 | public 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 | } |
---|