source: src/main/java/project/educatum/model/Listening.java@ d3cf3a1

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

Initial commit

  • Property mode set to 100644
File size: 745 bytes
Line 
1package project.educatum.model;
2
3import lombok.Data;
4import project.educatum.model.primarykeys.ListeningID;
5
6import javax.persistence.*;
7
8@Data
9@Entity
10@Table(name = "slusanje", schema = "project")
11public class Listening {
12
13 public Listening(ListeningID id, Payment idPayment, Student studentID, Boolean paid) {
14 this.id = id;
15 this.idPayment = idPayment;
16 this.studentID = studentID;
17 this.paid = paid;
18 }
19
20 @EmbeddedId
21 private ListeningID id;
22
23 @ManyToOne
24 @JoinColumn(name = "id_plakjanja")
25 private Payment idPayment;
26
27 @ManyToOne
28 @JoinColumn(name = "id_ucenik")
29 private Student studentID;
30
31 @Column(name = "plateno")
32 private Boolean paid;
33
34 public Listening() {
35 }
36}
Note: See TracBrowser for help on using the repository browser.