mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
explore page working i believe
This commit is contained in:
@@ -40,6 +40,10 @@ public class Recipe {
|
||||
|
||||
private String status;
|
||||
|
||||
@NotNull(message = "Please Provide a cost")
|
||||
@Positive(message = "This value cannot be negative")
|
||||
private Integer cost;
|
||||
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
@@ -76,7 +80,7 @@ public class Recipe {
|
||||
}
|
||||
|
||||
public Recipe(String title, String description, Integer prepTimeMinutes, Integer cookTimeMinutes, Integer servings,
|
||||
User user, String status) {
|
||||
User user, String status, Integer cost) {
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.prepTimeMinutes = prepTimeMinutes;
|
||||
@@ -86,6 +90,7 @@ public class Recipe {
|
||||
this.status = status;
|
||||
this.createdAt = LocalDateTime.now();
|
||||
this.updatedAt = LocalDateTime.now();
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
// Getters and setters
|
||||
@@ -208,4 +213,12 @@ public class Recipe {
|
||||
public void setUsers(Set<User> users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
public Integer getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void setCost(Integer cost) {
|
||||
this.cost = cost;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user