source: source/src/main/java/com/example/db/model/ShoppingBag.java

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.6 KB
Line 
1package com.example.db.model;
2
3import lombok.Data;
4
5import javax.persistence.*;
6import java.time.ZonedDateTime;
7
8@Entity
9@Data
10@Table(name="shopping_bag")
11public class ShoppingBag {
12
13 @Id
14 @GeneratedValue(strategy = GenerationType.IDENTITY)
15 Integer shopping_id;
16 ZonedDateTime order_date;
17 ZonedDateTime shipping_date;
18 ZonedDateTime modified;
19
20 @ManyToOne
21 @JoinColumn(name = "user_id")
22 public Users users;
23
24 public ShoppingBag(Integer shopping_id, ZonedDateTime order_date, ZonedDateTime shipping_date, ZonedDateTime modified, Users users) {
25 this.shopping_id = shopping_id;
26 this.order_date = order_date;
27 this.shipping_date = shipping_date;
28 this.modified = modified;
29 this.users = users;
30 }
31
32 public ShoppingBag() {
33
34 }
35
36 public Integer getShopping_id() {
37 return shopping_id;
38 }
39
40 public void setShopping_id(Integer shopping_id) {
41 this.shopping_id = shopping_id;
42 }
43
44 public ZonedDateTime getOrder_date() {
45 return order_date;
46 }
47
48 public void setOrder_date(ZonedDateTime order_date) {
49 this.order_date = order_date;
50 }
51
52 public ZonedDateTime getShipping_date() {
53 return shipping_date;
54 }
55
56 public void setShipping_date(ZonedDateTime shipping_date) {
57 this.shipping_date = shipping_date;
58 }
59
60 public ZonedDateTime getModified() {
61 return modified;
62 }
63
64 public void setModified(ZonedDateTime modified) {
65 this.modified = modified;
66 }
67
68 public Users getUsers() {
69 return users;
70 }
71
72 public void setUsers(Users users) {
73 this.users = users;
74 }
75}
Note: See TracBrowser for help on using the repository browser.