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:
1.1 KB
|
Line | |
---|
1 | package com.example.fooddeliverysystem.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 |
|
---|
5 | import java.sql.Timestamp;
|
---|
6 | import java.time.LocalDate;
|
---|
7 |
|
---|
8 | @Entity
|
---|
9 | @Table(name = "naplata")
|
---|
10 | public class OrderPayment {
|
---|
11 |
|
---|
12 | @Id
|
---|
13 | @Column(name = "naplata_id")
|
---|
14 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
15 | private Long orderPaymentId;
|
---|
16 |
|
---|
17 | @Column(name = "iznos")
|
---|
18 | private Integer orderCost;
|
---|
19 |
|
---|
20 | @Column(name = "nplakjanje")
|
---|
21 | private String orderPaymentType;
|
---|
22 |
|
---|
23 | @Column(name = "datum_naplata")
|
---|
24 | private Timestamp orderPaymentDate;
|
---|
25 |
|
---|
26 | @ManyToOne
|
---|
27 | @JoinColumn(name = "potrosuvac_id")
|
---|
28 | private Consumer consumer;
|
---|
29 |
|
---|
30 | @ManyToOne
|
---|
31 | @JoinColumn(name = "dostavuvac_id")
|
---|
32 | private Deliver deliver;
|
---|
33 |
|
---|
34 | public OrderPayment(Integer orderCost, String orderPaymentType, Timestamp orderPaymentDate, Consumer consumer, Deliver deliver) {
|
---|
35 | this.orderCost = orderCost;
|
---|
36 | this.orderPaymentType = orderPaymentType;
|
---|
37 | this.orderPaymentDate = orderPaymentDate;
|
---|
38 | this.consumer = consumer;
|
---|
39 | this.deliver = deliver;
|
---|
40 | }
|
---|
41 | public OrderPayment(){
|
---|
42 |
|
---|
43 | }
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.