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:
743 bytes
|
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.time.LocalDate;
|
---|
9 |
|
---|
10 | @Entity
|
---|
11 | @Table(name = "cena")
|
---|
12 | @Data
|
---|
13 | @AllArgsConstructor
|
---|
14 | @NoArgsConstructor
|
---|
15 |
|
---|
16 | public class Price {
|
---|
17 |
|
---|
18 |
|
---|
19 | // @JoinColumn(name = "id_stavka", referencedColumnName = "id_stavka", nullable = false)
|
---|
20 | //@ManyToOne
|
---|
21 | // private FoodItem foodItem;
|
---|
22 |
|
---|
23 | // @Id
|
---|
24 | //@Column(name = "broj_cena")
|
---|
25 | //private Long priceNumber;
|
---|
26 |
|
---|
27 | @EmbeddedId
|
---|
28 | private PriceKey priceKey;
|
---|
29 |
|
---|
30 | @Column(name = "iznos")
|
---|
31 | private Integer cost;
|
---|
32 |
|
---|
33 | @Column(name = "vazi_od")
|
---|
34 | private LocalDate validFrom;
|
---|
35 |
|
---|
36 | @Column(name = "vazi_do")
|
---|
37 | private LocalDate validTo;
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.