diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhase.java b/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhase.java index 71b4705..9348f2b 100644 --- a/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhase.java +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhase.java @@ -12,7 +12,7 @@ public record GrowthPhase( MonthDay startDate, MonthDay endDate, int group, - Object wateringCycle, + WateringCycle wateringCycle, @JsonDeserialize(using = GrowthPhaseTypeDeserializer.class) GrowthPhaseType type, @JsonDeserialize(using = HardinessZoneDeserializer.class) HardinessZone zone, List taskTemplates) { diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/Pest.java b/src/main/java/ch/zhaw/gartenverwaltung/types/Pest.java new file mode 100644 index 0000000..cfbcb81 --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/Pest.java @@ -0,0 +1,4 @@ +package ch.zhaw.gartenverwaltung.types; + +public record Pest(String name, String description, String measures) { +} diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/Plant.java b/src/main/java/ch/zhaw/gartenverwaltung/types/Plant.java index 46ff155..13652a6 100644 --- a/src/main/java/ch/zhaw/gartenverwaltung/types/Plant.java +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/Plant.java @@ -12,7 +12,7 @@ public record Plant( String spacing, int light, String soil, - List pests, + List pests, List lifecycle) { public void inZone(HardinessZone zone) { diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/WateringCycle.java b/src/main/java/ch/zhaw/gartenverwaltung/types/WateringCycle.java new file mode 100644 index 0000000..9d7c7d0 --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/WateringCycle.java @@ -0,0 +1,8 @@ +package ch.zhaw.gartenverwaltung.types; + +public record WateringCycle( + int litersPerSqM, + int interval, + String[] notes +) { +} diff --git a/src/main/resources/ch/zhaw/gartenverwaltung/io/plantdb.json b/src/main/resources/ch/zhaw/gartenverwaltung/io/plantdb.json index 8ec3394..f513570 100644 --- a/src/main/resources/ch/zhaw/gartenverwaltung/io/plantdb.json +++ b/src/main/resources/ch/zhaw/gartenverwaltung/io/plantdb.json @@ -159,7 +159,7 @@ { "name": "Rot", "description": "rot, any of several plant diseases, caused by any of hundreds of species of soil-borne bacteria, fungi, and funguslike organisms (Oomycota). Rot diseases are characterized by plant decomposition and putrefaction. The decay may be hard, dry, spongy, watery, mushy, or slimy and may affect any plant part.", - "measurement": "less water" + "measures": "less water" } ] }, @@ -247,7 +247,7 @@ { "name": "Rot", "description": "rot, any of several plant diseases, caused by any of hundreds of species of soil-borne bacteria, fungi, and funguslike organisms (Oomycota). Rot diseases are characterized by plant decomposition and putrefaction. The decay may be hard, dry, spongy, watery, mushy, or slimy and may affect any plant part.", - "measurement": "less water" + "measures": "less water" } ] }