|
@@ -6,7 +6,6 @@ import com.example.plantsforyou.plant.enums.PlantTypeOfLight;
|
|
|
import lombok.Getter;
|
|
import lombok.Getter;
|
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.NoArgsConstructor;
|
|
|
import lombok.Setter;
|
|
import lombok.Setter;
|
|
|
-import org.springframework.context.annotation.Description;
|
|
|
|
|
|
|
|
|
|
import javax.persistence.*;
|
|
import javax.persistence.*;
|
|
|
|
|
|
|
@@ -29,20 +28,28 @@ public class Plant {
|
|
|
private PlantCareDifficulty difficulty;
|
|
private PlantCareDifficulty difficulty;
|
|
|
@Enumerated(EnumType.STRING)
|
|
@Enumerated(EnumType.STRING)
|
|
|
private PlantSize size;
|
|
private PlantSize size;
|
|
|
- boolean in_stock;
|
|
|
|
|
|
|
+ boolean inStock;
|
|
|
|
|
|
|
|
public Plant(String name,
|
|
public Plant(String name,
|
|
|
double price,
|
|
double price,
|
|
|
String description,
|
|
String description,
|
|
|
PlantTypeOfLight typeOfLight,
|
|
PlantTypeOfLight typeOfLight,
|
|
|
PlantCareDifficulty difficulty,
|
|
PlantCareDifficulty difficulty,
|
|
|
- PlantSize size, boolean in_stock) {
|
|
|
|
|
|
|
+ PlantSize size, boolean inStock) {
|
|
|
this.name = name;
|
|
this.name = name;
|
|
|
this.price = price;
|
|
this.price = price;
|
|
|
this.description = description;
|
|
this.description = description;
|
|
|
this.typeOfLight = typeOfLight;
|
|
this.typeOfLight = typeOfLight;
|
|
|
this.difficulty = difficulty;
|
|
this.difficulty = difficulty;
|
|
|
this.size = size;
|
|
this.size = size;
|
|
|
- this.in_stock = in_stock;
|
|
|
|
|
|
|
+ this.inStock = inStock;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public void setPrice(double price) {
|
|
|
|
|
+ this.price = price;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public void setInStock(boolean inStock) {
|
|
|
|
|
+ this.inStock = inStock;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|