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
|
||||
private Double price;
|
||||
|
||||
private Boolean available;
|
||||
|
||||
private String description;
|
||||
|
||||
private String imageUrl;
|
||||
}
|
||||
|
||||
@@ -26,5 +26,9 @@ public class UpdateMenuItem implements EntityInterface, MenuItemInterface {
|
||||
|
||||
Double price;
|
||||
|
||||
Boolean available;
|
||||
|
||||
String description;
|
||||
|
||||
String imageUrl;
|
||||
}
|
||||
|
||||
@@ -20,10 +20,16 @@ public class MenuItemEntity extends BaseEntity implements MenuItemInterface {
|
||||
@Column(nullable = false)
|
||||
public Double price;
|
||||
|
||||
@Column(columnDefinition = "boolean default true")
|
||||
public Boolean available;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "eatery_id")
|
||||
public EateryEntity eatery;
|
||||
|
||||
@Column(columnDefinition = "TEXT default ''")
|
||||
public String description;
|
||||
|
||||
@Column(nullable = true)
|
||||
public String imageUrl;
|
||||
|
||||
|
||||
@@ -88,6 +88,8 @@ public class EateryServiceTest {
|
||||
new AddMenuItem(
|
||||
faker.food().dish(),
|
||||
faker.number().randomDouble(2, 10, 100),
|
||||
true,
|
||||
"",
|
||||
""
|
||||
)
|
||||
).id;
|
||||
|
||||
@@ -5,6 +5,10 @@ public interface MenuItemInterface {
|
||||
void setName(String x);
|
||||
Double getPrice();
|
||||
void setPrice(Double x);
|
||||
Boolean getAvailable();
|
||||
void setAvailable(Boolean x);
|
||||
String getImageUrl();
|
||||
void setImageUrl(String x);
|
||||
String getDescription();
|
||||
void setDescription(String x);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user