25 lines
475 B
Rust
25 lines
475 B
Rust
use crate::domain::{Ingredient, Lang};
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct Recipe {
|
|
pub key: String,
|
|
pub lang: Lang,
|
|
pub name: String,
|
|
pub instructions: Vec<String>,
|
|
pub ingredients: Vec<RecipeIngredient>,
|
|
}
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct RecipeIngredient {
|
|
pub ingredient: Ingredient,
|
|
pub measure: Measure,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub enum Measure {
|
|
Gram(u32),
|
|
KiloGram(u32),
|
|
MilliLiter(u32),
|
|
Liter(u32),
|
|
}
|