source: src/main/java/com/example/eatys_app/model/Restoran.java

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

Adding project to repo

  • Property mode set to 100644
File size: 1.8 KB
Line 
1package com.example.eatys_app.model;
2
3import jakarta.persistence.*;
4
5import java.util.LinkedHashSet;
6import java.util.Set;
7
8@Entity
9@Table(name = "restoran", schema = "project")
10public class Restoran {
11
12 @Id
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Column(name = "restoran_id", nullable = false)
15 private Integer id;
16
17 @Column(name = "restoran_ime")
18 private String ime;
19
20 @Column(name = "restoran_rejting")
21 private Integer rejting;
22
23 @Column(name = "restoran_adresa")
24 private String adresa;
25
26
27 @OneToOne
28 @JoinColumn(name = "user_id")
29 private Menadzer menadzer;
30
31
32
33 public Restoran() {
34 }
35
36
37
38 public Restoran(String ime, Integer rejting, String adresa, Menadzer menadzer) {
39 this.ime = ime;
40 this.rejting = rejting;
41 this.adresa = adresa;
42 this.menadzer = menadzer;
43 }
44
45 public Integer getId() {
46 return id;
47 }
48
49 public void setId(Integer id) {
50 this.id = id;
51 }
52
53 public String getIme() {
54 return ime;
55 }
56
57 public void setIme(String ime) {
58 this.ime = ime;
59 }
60
61 public Integer getRejting() {
62 return rejting;
63 }
64
65 public void setRejting(Integer rejting) {
66 this.rejting = rejting;
67 }
68
69 public String getAdresa() {
70 return adresa;
71 }
72
73 public void setAdresa(String adresa) {
74 this.adresa = adresa;
75 }
76
77 public Menadzer getMenadzer() {
78 return menadzer;
79 }
80
81 public void setMenadzer(Menadzer menadzer) {
82 this.menadzer = menadzer;
83 }
84
85
86}
Note: See TracBrowser for help on using the repository browser.