WS 10
This commit is contained in:
@@ -2,6 +2,14 @@ package dev.model;
|
||||
|
||||
public class MenuItem {
|
||||
|
||||
public MenuItem (int id, String name, String description, double price, String category) {
|
||||
this.id =id;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.price = price;
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
private int id;
|
||||
|
||||
private String name;
|
||||
@@ -12,4 +20,16 @@ public class MenuItem {
|
||||
|
||||
private String category;
|
||||
|
||||
public int getId() { return id; }
|
||||
|
||||
public String getName() { return name; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
|
||||
public double getPrice() { return price; }
|
||||
|
||||
public String getCategory() { return category; }
|
||||
|
||||
public void setId(int Id) { id = Id; }
|
||||
|
||||
}
|
||||
@@ -4,6 +4,13 @@ import java.time.LocalDateTime;
|
||||
|
||||
public class Order {
|
||||
|
||||
public Order (int id, int userId, LocalDateTime createdAt, double totalPrice) {
|
||||
this.id = id;
|
||||
this.userId = userId;
|
||||
this.createdAt = createdAt;
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
private int id;
|
||||
|
||||
private int userId;
|
||||
@@ -12,4 +19,14 @@ public class Order {
|
||||
|
||||
private double totalPrice;
|
||||
|
||||
public int getId() { return id; }
|
||||
|
||||
public int getUserId() { return userId; }
|
||||
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
|
||||
public double getTotalPrice() { return totalPrice; }
|
||||
|
||||
public void setId(int Id) { id = Id; }
|
||||
|
||||
}
|
||||
@@ -2,6 +2,14 @@ package dev.model;
|
||||
|
||||
public class OrderDetail {
|
||||
|
||||
public OrderDetail (int id, int orderId, int menuItemId, int quantity, double price) {
|
||||
this.id = id;
|
||||
this.orderId = orderId;
|
||||
this.menuItemId = menuItemId;
|
||||
this.quantity = quantity;
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
private int id;
|
||||
|
||||
private int orderId;
|
||||
@@ -12,4 +20,16 @@ public class OrderDetail {
|
||||
|
||||
private double price;
|
||||
|
||||
public int getId() { return id; }
|
||||
|
||||
public int getOrderId() { return orderId; }
|
||||
|
||||
public int getMenuItemId() { return menuItemId; }
|
||||
|
||||
public int getQuantity() { return quantity; }
|
||||
|
||||
public double getPrice() { return price; }
|
||||
|
||||
public void setId(int Id) { id = Id; }
|
||||
|
||||
}
|
||||
@@ -2,6 +2,13 @@ package dev.model;
|
||||
|
||||
public class User {
|
||||
|
||||
public User (int id, String username, String password, String email) {
|
||||
this.id = id;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
private int id;
|
||||
|
||||
private String username;
|
||||
@@ -10,4 +17,14 @@ public class User {
|
||||
|
||||
private String email;
|
||||
|
||||
public int getId() { return id; }
|
||||
|
||||
public String getUsername() { return username; }
|
||||
|
||||
public String getPassword() { return password; }
|
||||
|
||||
public String getEmail() { return email; }
|
||||
|
||||
public void setId(int Id) { id = Id; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user