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:
1.5 KB
|
Line | |
---|
1 | package com.example.eatys_app.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 |
|
---|
5 | import java.util.HashSet;
|
---|
6 | import java.util.Set;
|
---|
7 |
|
---|
8 | @Entity
|
---|
9 | @Table(name = "obrok", schema = "project")
|
---|
10 | public class Obrok {
|
---|
11 |
|
---|
12 | @Id
|
---|
13 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
14 | @Column(name = "obrok_id", nullable = false)
|
---|
15 | private Integer Id;
|
---|
16 |
|
---|
17 | @Column(name = "obrok_opis", nullable = false)
|
---|
18 | private String opis;
|
---|
19 |
|
---|
20 | @Column(name = "obrok_ime", nullable = false)
|
---|
21 | private String ime;
|
---|
22 |
|
---|
23 | @ManyToOne
|
---|
24 | @JoinColumn(name = "meni_id", nullable = false)
|
---|
25 | private Meni meni;
|
---|
26 |
|
---|
27 | @OneToMany(mappedBy = "obrok")
|
---|
28 | private Set<SeSostoiOd> obrokEVoNaracka = new HashSet<SeSostoiOd>();
|
---|
29 |
|
---|
30 |
|
---|
31 |
|
---|
32 | public Obrok() {
|
---|
33 | }
|
---|
34 |
|
---|
35 | public Obrok(String ime,String opis, Meni meni) {
|
---|
36 | this.ime = ime;
|
---|
37 | this.opis = opis;
|
---|
38 | this.meni = meni;
|
---|
39 | }
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 | public Integer getId() {
|
---|
44 | return Id;
|
---|
45 | }
|
---|
46 |
|
---|
47 | public void setId(Integer id) {
|
---|
48 | Id = id;
|
---|
49 | }
|
---|
50 |
|
---|
51 | public String getOpis() {
|
---|
52 | return opis;
|
---|
53 | }
|
---|
54 |
|
---|
55 | public void setOpis(String opis) {
|
---|
56 | this.opis = opis;
|
---|
57 | }
|
---|
58 |
|
---|
59 | public String getIme() {
|
---|
60 | return ime;
|
---|
61 | }
|
---|
62 |
|
---|
63 | public void setIme(String ime) {
|
---|
64 | this.ime = ime;
|
---|
65 | }
|
---|
66 |
|
---|
67 | public Meni getMeni() {
|
---|
68 | return meni;
|
---|
69 | }
|
---|
70 |
|
---|
71 | public void setMeni(Meni meni) {
|
---|
72 | this.meni = meni;
|
---|
73 | }
|
---|
74 |
|
---|
75 | public Set<SeSostoiOd> getObrokEVoNaracka() {
|
---|
76 | return obrokEVoNaracka;
|
---|
77 | }
|
---|
78 |
|
---|
79 | public void setObrokEVoNaracka(Set<SeSostoiOd> obrokEVoNaracka) {
|
---|
80 | this.obrokEVoNaracka = obrokEVoNaracka;
|
---|
81 | }
|
---|
82 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.