Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com> Reviewed-on: #55
This commit was merged in pull request #55.
This commit is contained in:
@@ -23,5 +23,9 @@ public class AddMenuItem implements MenuItemInterface {
|
|||||||
@NonNull
|
@NonNull
|
||||||
private Double price;
|
private Double price;
|
||||||
|
|
||||||
|
private Boolean available;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
private String imageUrl;
|
private String imageUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,5 +26,9 @@ public class UpdateMenuItem implements EntityInterface, MenuItemInterface {
|
|||||||
|
|
||||||
Double price;
|
Double price;
|
||||||
|
|
||||||
|
Boolean available;
|
||||||
|
|
||||||
|
String description;
|
||||||
|
|
||||||
String imageUrl;
|
String imageUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,16 @@ public class MenuItemEntity extends BaseEntity implements MenuItemInterface {
|
|||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
public Double price;
|
public Double price;
|
||||||
|
|
||||||
|
@Column(columnDefinition = "boolean default true")
|
||||||
|
public Boolean available;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "eatery_id")
|
@JoinColumn(name = "eatery_id")
|
||||||
public EateryEntity eatery;
|
public EateryEntity eatery;
|
||||||
|
|
||||||
|
@Column(columnDefinition = "TEXT default ''")
|
||||||
|
public String description;
|
||||||
|
|
||||||
@Column(nullable = true)
|
@Column(nullable = true)
|
||||||
public String imageUrl;
|
public String imageUrl;
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ public class EateryServiceTest {
|
|||||||
new AddMenuItem(
|
new AddMenuItem(
|
||||||
faker.food().dish(),
|
faker.food().dish(),
|
||||||
faker.number().randomDouble(2, 10, 100),
|
faker.number().randomDouble(2, 10, 100),
|
||||||
|
true,
|
||||||
|
"",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
).id;
|
).id;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ public interface MenuItemInterface {
|
|||||||
void setName(String x);
|
void setName(String x);
|
||||||
Double getPrice();
|
Double getPrice();
|
||||||
void setPrice(Double x);
|
void setPrice(Double x);
|
||||||
|
Boolean getAvailable();
|
||||||
|
void setAvailable(Boolean x);
|
||||||
String getImageUrl();
|
String getImageUrl();
|
||||||
void setImageUrl(String x);
|
void setImageUrl(String x);
|
||||||
|
String getDescription();
|
||||||
|
void setDescription(String x);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user