Last change
on this file since 8d11f8c was 8d11f8c, checked in by jovanmanchev <jovanmanchev3003@…>, 20 months ago |
code added, trial 2
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | package com.example.fooddeliverysystem.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.AllArgsConstructor;
|
---|
5 | import lombok.Data;
|
---|
6 | import lombok.NoArgsConstructor;
|
---|
7 |
|
---|
8 | import java.util.List;
|
---|
9 |
|
---|
10 | @Entity
|
---|
11 | @Table(name = "prodazhnomesto")
|
---|
12 |
|
---|
13 | @NoArgsConstructor
|
---|
14 | @AllArgsConstructor
|
---|
15 | public class SalePlace {
|
---|
16 | @Id
|
---|
17 | @Column(name = "id_mesto")
|
---|
18 | private Long salePalceId;
|
---|
19 |
|
---|
20 | @Column(name = "ime")
|
---|
21 | private String salePlaceName;
|
---|
22 |
|
---|
23 | @Column(name = "ulica")
|
---|
24 | private String salePlaceStreetName;
|
---|
25 |
|
---|
26 | @Column(name = "broj")
|
---|
27 | private Integer salePlaceStreetNumber;
|
---|
28 |
|
---|
29 | @ManyToOne
|
---|
30 | @JoinColumn(name = "franshiza_id")
|
---|
31 | private Franchize franchize;
|
---|
32 |
|
---|
33 | @ManyToOne
|
---|
34 | @JoinColumn(name = "admin_id")
|
---|
35 | private Admin admin;
|
---|
36 |
|
---|
37 | @OneToMany(mappedBy = "salePlace", fetch = FetchType.EAGER)
|
---|
38 | List<FoodItem> foodItemList;
|
---|
39 |
|
---|
40 | public Long getSalePalceId() {
|
---|
41 | return salePalceId;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public String getSalePlaceName() {
|
---|
45 | return salePlaceName;
|
---|
46 | }
|
---|
47 |
|
---|
48 | public String getSalePlaceStreetName() {
|
---|
49 | return salePlaceStreetName;
|
---|
50 | }
|
---|
51 |
|
---|
52 | public Integer getSalePlaceStreetNumber() {
|
---|
53 | return salePlaceStreetNumber;
|
---|
54 | }
|
---|
55 |
|
---|
56 | public Franchize getFranchize() {
|
---|
57 | return franchize;
|
---|
58 | }
|
---|
59 |
|
---|
60 | public Admin getAdmin() {
|
---|
61 | return admin;
|
---|
62 | }
|
---|
63 |
|
---|
64 | public List<FoodItem> getFoodItemList() {
|
---|
65 | return foodItemList;
|
---|
66 | }
|
---|
67 | }
|
---|
68 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.