mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
The Unpopular Decision
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.example.demo.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
|
||||
public class IngredientDto {
|
||||
|
||||
@NotBlank(message = "ingredientName is required")
|
||||
private String ingredientName;
|
||||
|
||||
@PositiveOrZero(message = "quantity must be 0 or greater")
|
||||
private BigDecimal quantity;
|
||||
|
||||
private String unit;
|
||||
|
||||
public String getIngredientName() { return ingredientName; }
|
||||
public void setIngredientName(String ingredientName) { this.ingredientName = ingredientName; }
|
||||
|
||||
public @PositiveOrZero(message = "quantity must be 0 or greater") BigDecimal getQuantity() { return quantity; }
|
||||
public void setQuantity(BigDecimal bigDecimal) { this.quantity = bigDecimal; }
|
||||
|
||||
public String getUnit() { return unit; }
|
||||
public void setUnit(String unit) { this.unit = unit; }
|
||||
}
|
||||
Reference in New Issue
Block a user