This commit is contained in:
2026-06-22 23:39:36 +03:30
parent 00f990c653
commit 5ea8a95fe7
22 changed files with 779 additions and 253 deletions
+50 -4
View File
@@ -3,13 +3,59 @@ package dev.model;
public class MenuItem {
private int id;
private String name;
private String description;
private double price;
private String category;
public 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;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
}
+41 -3
View File
@@ -5,11 +5,49 @@ import java.time.LocalDateTime;
public class Order {
private int id;
private int userId;
private LocalDateTime createdAt;
private double totalPrice;
public Order() {
}
public Order(int id, int userId, LocalDateTime createdAt, double totalPrice) {
this.id = id;
this.userId = userId;
this.createdAt = createdAt;
this.totalPrice = totalPrice;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public LocalDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(LocalDateTime createdAt) {
this.createdAt = createdAt;
}
public double getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(double totalPrice) {
this.totalPrice = totalPrice;
}
}
+50 -4
View File
@@ -3,13 +3,59 @@ package dev.model;
public class OrderDetail {
private int id;
private int orderId;
private int menuItemId;
private int quantity;
private double price;
public 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;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getOrderId() {
return orderId;
}
public void setOrderId(int orderId) {
this.orderId = orderId;
}
public int getMenuItemId() {
return menuItemId;
}
public void setMenuItemId(int menuItemId) {
this.menuItemId = menuItemId;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
}
+41 -3
View File
@@ -3,11 +3,49 @@ package dev.model;
public class User {
private int id;
private String username;
private String password;
private String email;
public User() {
}
public User(int id, String username, String password, String email) {
this.id = id;
this.username = username;
this.password = password;
this.email = email;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}