Last change
on this file was 8d11f8c, checked in by jovanmanchev <jovanmanchev3003@…>, 20 months ago |
code added, trial 2
|
-
Property mode
set to
100644
|
File size:
659 bytes
|
Line | |
---|
1 | package com.example.fooddeliverysystem.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.Column;
|
---|
4 | import jakarta.persistence.Embeddable;
|
---|
5 | import jakarta.persistence.JoinColumn;
|
---|
6 | import jakarta.persistence.OneToOne;
|
---|
7 |
|
---|
8 | import java.io.Serializable;
|
---|
9 |
|
---|
10 | @Embeddable
|
---|
11 | public class PriceKey implements Serializable {
|
---|
12 |
|
---|
13 | @OneToOne(optional = false)
|
---|
14 | @JoinColumn(name = "id_stavka", nullable = false)
|
---|
15 | private FoodItem foodItem;
|
---|
16 |
|
---|
17 | @Column(name = "broj_cena", nullable = false)
|
---|
18 | private Long priceNumber;
|
---|
19 |
|
---|
20 |
|
---|
21 | public PriceKey(){
|
---|
22 |
|
---|
23 | }
|
---|
24 |
|
---|
25 | public FoodItem getFoodItem() {
|
---|
26 | return foodItem;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public Long getPriceNumber() {
|
---|
30 | return priceNumber;
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.