source: src/main/java/com/example/eatys_app/model/Naracka.java@ b3f2adb

Last change on this file since b3f2adb was b3f2adb, checked in by Aleksandar Siljanoski <acewow3@…>, 14 months ago

Adding project to repo

  • Property mode set to 100644
File size: 2.6 KB
Line 
1package com.example.eatys_app.model;
2
3import jakarta.persistence.*;
4
5import java.sql.Timestamp;
6import java.util.HashSet;
7import java.util.Set;
8
9@Entity
10@Table(name = "naracka", schema = "project")
11public class Naracka {
12
13 @Id
14 @GeneratedValue(strategy = GenerationType.IDENTITY)
15 @Column(name = "naracka_id")
16 private Integer id;
17
18 @Column(name = "naracana_na")
19 private Timestamp naracana;
20
21 @Column(name = "naracka_status")
22 private String status;
23
24 @Column(name = "naracka_cena_vkupna")
25 private Integer cena;
26
27 @ManyToOne
28 @JoinColumn(name = "user_id_kupuvac")
29 private Kupuvac kupuvac;
30
31 @ManyToOne
32 @JoinColumn(name = "user_id_dostavuvac")
33 private Dostavuvac dostavuvac;
34
35
36 @OneToMany(mappedBy = "naracka")
37 private Set<SeSostoiOd> narackaSeSostoiOd = new HashSet<SeSostoiOd>();
38
39
40 public Naracka() {
41 }
42
43 public Naracka(Timestamp naracana, String status, Integer cena, Kupuvac kupuvac, Dostavuvac dostavuvac) {
44 this.naracana = naracana;
45 this.status = status;
46 this.cena = cena;
47 this.kupuvac = kupuvac;
48 this.dostavuvac = dostavuvac;
49
50 }
51
52 public Naracka(Kupuvac kupuvac) {
53 this.kupuvac=kupuvac;
54 }
55
56 public Naracka(Integer id, Timestamp naracana, String status, Integer cena, Kupuvac kupuvac, Dostavuvac dostavuvac) {
57 this.id = id;
58 this.naracana = naracana;
59 this.status = status;
60 this.cena = cena;
61 this.kupuvac = kupuvac;
62 this.dostavuvac = dostavuvac;
63
64 }
65
66 public Integer getId() {
67 return id;
68 }
69
70 public void setId(Integer id) {
71 this.id = id;
72 }
73
74 public Timestamp getNaracana() {
75 return naracana;
76 }
77
78 public void setNaracana(Timestamp naracana) {
79 this.naracana = naracana;
80 }
81
82 public String getStatus() {
83 return status;
84 }
85
86 public void setStatus(String status) {
87 this.status = status;
88 }
89
90 public Integer getCena() {
91 return cena;
92 }
93
94 public void setCena(Integer cena) {
95 this.cena = cena;
96 }
97
98 public Kupuvac getKupuvac() {
99 return kupuvac;
100 }
101
102 public void setKupuvac(Kupuvac kupuvac) {
103 this.kupuvac = kupuvac;
104 }
105
106 public Dostavuvac getDostavuvac() {
107 return dostavuvac;
108 }
109
110 public void setDostavuvac(Dostavuvac dostavuvac) {
111 this.dostavuvac = dostavuvac;
112 }
113
114 public Set<SeSostoiOd> getNarackaSeSostoiOd() {
115 return narackaSeSostoiOd;
116 }
117
118 public void setNarackaSeSostoiOd(Set<SeSostoiOd> narackaSeSostoiOd) {
119 this.narackaSeSostoiOd = narackaSeSostoiOd;
120 }
121}
Note: See TracBrowser for help on using the repository browser.