Last change
on this file was bc0eeb4, checked in by Evgenija2000 <eva_nikolaevska@…>, 2 years ago |
all files
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | package com.example.db.model;
|
---|
2 |
|
---|
3 | import lombok.Data;
|
---|
4 |
|
---|
5 | import javax.persistence.*;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | @Data
|
---|
9 | @Table(name="payment")
|
---|
10 | public class Payment {
|
---|
11 |
|
---|
12 | @Id
|
---|
13 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
14 | Integer payment_id;
|
---|
15 |
|
---|
16 | String info;
|
---|
17 |
|
---|
18 | @ManyToOne
|
---|
19 | @JoinColumn(name = "shopping_id")
|
---|
20 | public ShoppingBag shoppingBag;
|
---|
21 |
|
---|
22 | public Payment(Integer payment_id, String info, ShoppingBag shoppingBag) {
|
---|
23 | this.payment_id = payment_id;
|
---|
24 | this.info = info;
|
---|
25 | this.shoppingBag = shoppingBag;
|
---|
26 | }
|
---|
27 |
|
---|
28 | public Payment() {
|
---|
29 |
|
---|
30 | }
|
---|
31 |
|
---|
32 | public Integer getPayment_id() {
|
---|
33 | return payment_id;
|
---|
34 | }
|
---|
35 |
|
---|
36 | public void setPayment_id(Integer payment_id) {
|
---|
37 | this.payment_id = payment_id;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public String getInfo() {
|
---|
41 | return info;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public void setInfo(String info) {
|
---|
45 | this.info = info;
|
---|
46 | }
|
---|
47 |
|
---|
48 | public ShoppingBag getShoppingBag() {
|
---|
49 | return shoppingBag;
|
---|
50 | }
|
---|
51 |
|
---|
52 | public void setShoppingBag(ShoppingBag shoppingBag) {
|
---|
53 | this.shoppingBag = shoppingBag;
|
---|
54 | }
|
---|
55 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.