source: src/main/java/com/example/fooddeliverysystem/model/PriceKey.java

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
RevLine 
[8d11f8c]1package com.example.fooddeliverysystem.model;
2
3import jakarta.persistence.Column;
4import jakarta.persistence.Embeddable;
5import jakarta.persistence.JoinColumn;
6import jakarta.persistence.OneToOne;
7
8import java.io.Serializable;
9
10@Embeddable
11public 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.