-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXOrder.java
More file actions
76 lines (58 loc) · 1.53 KB
/
XOrder.java
File metadata and controls
76 lines (58 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.example.demo;
import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.time.LocalDate;
@Entity
public class XOrder {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private LocalDate dateTime;
private String toppings;
//TODO: price as double
//TODO: in the html template
// Add path for javascript / css from bootstrap
// add thymeleaf on top
// add navigation bootstrap
// everything you think we need to have
// then we will see together
// add readme file if you can
/* private String dough;
private String sauce;
private String cheese;
@Nullable
private String spinach;
@Nullable
private String bacon;
@Nullable
private String mushroom;
@Nullable
private String tomato;*/
@ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
@JoinColumn(name = "user_id")
private User user;
public XOrder() {
dateTime= LocalDate.now();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public LocalDate getDateTime() {
return dateTime;
}
public void setDateTime(LocalDate dateTime) {
this.dateTime = dateTime;
}
public String getToppings() {
return toppings;
}
public void setToppings(String toppings) {
this.toppings = toppings;
}
}