|
|
@@ -20,6 +20,7 @@ public class Plant {
|
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
private Long id;
|
|
|
private String name;
|
|
|
+ private double price;
|
|
|
@Column(columnDefinition="TEXT")
|
|
|
private String description;
|
|
|
@Enumerated(EnumType.STRING)
|
|
|
@@ -28,18 +29,20 @@ public class Plant {
|
|
|
private PlantCareDifficulty difficulty;
|
|
|
@Enumerated(EnumType.STRING)
|
|
|
private PlantSize size;
|
|
|
+ boolean in_stock;
|
|
|
|
|
|
public Plant(String name,
|
|
|
+ double price,
|
|
|
String description,
|
|
|
PlantTypeOfLight typeOfLight,
|
|
|
PlantCareDifficulty difficulty,
|
|
|
- PlantSize size) {
|
|
|
+ PlantSize size, boolean in_stock) {
|
|
|
this.name = name;
|
|
|
+ this.price = price;
|
|
|
this.description = description;
|
|
|
this.typeOfLight = typeOfLight;
|
|
|
this.difficulty = difficulty;
|
|
|
this.size = size;
|
|
|
+ this.in_stock = in_stock;
|
|
|
}
|
|
|
-}
|
|
|
-//TODO Add price and update price method in service
|
|
|
-// Maybe in-stock boolean?
|
|
|
+}
|