diff --git a/src/main/java/ch/zhaw/gartenverwaltung/io/PlantDatabase.java b/src/main/java/ch/zhaw/gartenverwaltung/io/PlantDatabase.java new file mode 100644 index 0000000..f0d9bf9 --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/io/PlantDatabase.java @@ -0,0 +1,12 @@ +package ch.zhaw.gartenverwaltung.io; + +import ch.zhaw.gartenverwaltung.types.Plant; +import ch.zhaw.gartenverwaltung.types.HardinessZone; + +import java.util.List; +import java.util.Optional; + +public interface PlantDatabase { + List getPlantList(HardinessZone zone); + Optional getPlantById(long id); +} diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhase.java b/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhase.java new file mode 100644 index 0000000..665b895 --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhase.java @@ -0,0 +1,9 @@ +package ch.zhaw.gartenverwaltung.types; + +import java.util.Date; + +public record GrowthPhase(Date startDate, + Date endDate, + GrowthPhaseType type, + HardinessZone zone) { +} diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhaseType.java b/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhaseType.java new file mode 100644 index 0000000..99e5d2b --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/GrowthPhaseType.java @@ -0,0 +1,5 @@ +package ch.zhaw.gartenverwaltung.types; + +public enum GrowthPhaseType { + SOW, PLANT, HARVEST +} diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/HardinessZone.java b/src/main/java/ch/zhaw/gartenverwaltung/types/HardinessZone.java new file mode 100644 index 0000000..5d0bc91 --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/HardinessZone.java @@ -0,0 +1,9 @@ +package ch.zhaw.gartenverwaltung.types; + +/** + * Represents the available hardiness zones + * (Subject to later expansion) + */ +public enum HardinessZone { + ZONE_8A +} diff --git a/src/main/java/ch/zhaw/gartenverwaltung/types/Plant.java b/src/main/java/ch/zhaw/gartenverwaltung/types/Plant.java new file mode 100644 index 0000000..99336e7 --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/types/Plant.java @@ -0,0 +1,11 @@ +package ch.zhaw.gartenverwaltung.types; + +import java.util.List; + +public record Plant( + long id, + String name, + String description, + int spacing, + List lifecycle) { +}