source: src/main/java/com/example/baza/model/Kazna.java@ ed20c2c

Last change on this file since ed20c2c was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 1.8 KB
Line 
1package com.example.baza.model;
2
3import lombok.NoArgsConstructor;
4
5import javax.persistence.*;
6import java.time.LocalDate;
7
8@Entity
9@Table(name = "kazna", schema = "project")
10@NoArgsConstructor
11public class Kazna {
12 @Id
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Column(name = "id_kazna", nullable = false)
15 private Integer id;
16
17 @Column(name = "datum", nullable = false)
18 private LocalDate datum;
19
20 @Column(name = "cena_vo_denari", nullable = false)
21 private Double cenaVoDenari;
22
23 @ManyToOne(fetch = FetchType.LAZY, optional = false)
24 @JoinColumn(name = "id_pozajmica_proverka", nullable = false)
25 private Pozajmica pozajmica;
26
27 @ManyToOne(fetch = FetchType.LAZY, optional = false)
28 @JoinColumn(name = "id_chovek_imakazna", nullable = false)
29 private Chlen2 chlen;
30
31 public Kazna(LocalDate datum, Double cenaVoDenari, Pozajmica pozajmica, Chlen2 chlen) {
32 this.datum = datum;
33 this.cenaVoDenari = cenaVoDenari;
34 this.pozajmica = pozajmica;
35 this.chlen = chlen;
36 }
37
38 public Chlen2 getChlen() {
39 return chlen;
40 }
41
42 public void setChlen(Chlen2 chlen) {
43 this.chlen = chlen;
44 }
45
46 public Pozajmica getPozajmica() {
47 return pozajmica;
48 }
49
50 public void setPozajmica(Pozajmica pozajmica) {
51 this.pozajmica = pozajmica;
52 }
53
54 public Double getCenaVoDenari() {
55 return cenaVoDenari;
56 }
57
58 public void setCenaVoDenari(Double cenaVoDenari) {
59 this.cenaVoDenari = cenaVoDenari;
60 }
61
62 public LocalDate getDatum() {
63 return datum;
64 }
65
66 public void setDatum(LocalDate datum) {
67 this.datum = datum;
68 }
69
70 public Integer getId() {
71 return id;
72 }
73
74 public void setId(Integer id) {
75 this.id = id;
76 }
77}
Note: See TracBrowser for help on using the repository browser.