source: src/main/java/project/educatum/model/Payment.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: 666 bytes
Line 
1package project.educatum.model;
2
3import lombok.Data;
4
5import javax.persistence.*;
6
7@Data
8@Entity
9@Table(name = "plakjanja", schema = "project")
10public class Payment {
11
12 @Id
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Column(name = "id_plakjanja", nullable = false)
15 private Integer id;
16
17 @Column(name = "iznos", nullable = false)
18 private Integer amount;
19
20 @ManyToOne(optional = false)
21 @JoinColumn(name = "id_nastavnik", nullable = false)
22 private Teacher idTeacher;
23
24 public Payment() {
25 }
26
27 public Payment(Integer amount, Teacher idTeacher) {
28 this.amount = amount;
29 this.idTeacher = idTeacher;
30 }
31}
Note: See TracBrowser for help on using the repository browser.