1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
//! Water requirement of a plant.
use diesel_derive_enum::DbEnum;
use serde::{Deserialize, Serialize};
use typeshare::typeshare;
use utoipa::ToSchema;
/// *Used* in hydrology layer.
/// *Fetched from* PracticalPlants and Permapeople (merged with `water` of PracticalPlants).
#[typeshare]
#[derive(Serialize, Deserialize, DbEnum, Debug, ToSchema)]
#[ExistingTypePath = "crate::schema::sql_types::WaterRequirement"]
pub enum WaterRequirement {
/// well drained, little water input
/// holding a lump of soil feels a little warm
#[serde(rename = "dry")]
#[db_rename = "dry"]
Dry,
/// regular water supply, e.g. flat bed with humus
/// holding a lump of soil feels a little cooler than the air around
#[serde(rename = "moist")]
#[db_rename = "moist"]
Moist,
/// drowned, (often) flooded or in general very moist, e.g. swamp
/// holding a lump of soil leaves a spot on your palm
#[serde(rename = "wet")]
#[db_rename = "wet"]
Wet,
/// completely aquatic
/// the soil is saturated with water, such as in a pond
#[serde(rename = "water")]
#[db_rename = "water"]
Water,
}