Calendar (WIP)

This commit is contained in:
Greg Burri 2025-01-29 14:37:25 +01:00
parent 9d3f9e9c60
commit 79a0aeb1b8
24 changed files with 613 additions and 231 deletions

View file

@ -1,3 +1,4 @@
use chrono::NaiveDate;
use ron::ser::{to_string_pretty, PrettyConfig};
use serde::{Deserialize, Serialize};
@ -16,7 +17,7 @@ pub struct Id {
pub id: i64,
}
///// RECIPE /////
/// RECIPE ///
#[derive(Serialize, Deserialize, Clone)]
pub struct SetRecipeTitle {
@ -158,7 +159,7 @@ pub struct Ingredient {
pub quantity_unit: String,
}
///// PROFILE /////
/// PROFILE ///
#[derive(Serialize, Deserialize, Clone)]
pub struct UpdateProfile {
@ -174,3 +175,11 @@ where
// TODO: handle'unwrap'.
to_string_pretty(&ron, PrettyConfig::new()).unwrap()
}
/// Calendar ///
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct ScheduledRecipes {
// (Scheduled date, recipe title, recipe id).
pub recipes: Vec<(NaiveDate, String, i64)>,
}