Adds pretty_output

This commit is contained in:
2019-02-01 13:53:50 +01:00
parent 1d091bd419
commit 66514eb192
3 changed files with 21 additions and 41 deletions

View File

@@ -5,7 +5,6 @@ extern crate dotenv;
pub mod schema;
pub mod models;
mod recipe;
mod importer;
use diesel::prelude::*;

View File

@@ -1,36 +0,0 @@
/// Tag associated with ingredients
#[allow(dead_code)]
pub enum FoodTag {
Viande,
Poisson,
Legume,
}
/// Categories for recipe, to organize them for navigation and planning
#[allow(dead_code)]
pub enum RecipeCategory {
PetitDejeuner,
Entree,
Plat,
Dessert,
}
/// A collection of tags, to be improved
type FoodTags = Vec<FoodTag>;
/// Nutritionnal values per 100g, to be improved
#[derive(Default)]
struct NutritionnalValues;
/// An individual ingredient
#[derive(Default)]
#[allow(dead_code)]
pub struct Ingredient {
/// All known alias of a same ingredient
alias: Vec<String>,
/// Nutrionnal values per 100g
nutrition: NutritionnalValues,
/// Associated tags to constraint planning
tags: FoodTags,
}