0ed482514b43dd2084b817afc738db3b6a1a11e7
1 use chrono
::prelude
::*;
8 pub struct UserLoginInfo
{
9 pub last_login_datetime
: DateTime
<Utc
>,
11 pub user_agent
: String
,
18 pub description
: String
,
19 pub estimate_time
: Option
<i32>, // [min].
20 pub difficulty
: Difficulty
,
22 //ingredients: Vec<Ingredient>, // For four people.
23 pub process
: Vec
<Group
>,
27 pub fn empty(id
: i64, user_id
: i64) -> Recipe
{
28 Self::new(id
, user_id
, String
::new(), String
::new())
31 pub fn new(id
: i64, user_id
: i64, title
: String
, description
: String
) -> Recipe
{
38 difficulty
: Difficulty
::Unknown
,
44 pub struct Ingredient
{
45 pub quantity
: Option
<Quantity
>,
55 pub name
: Option
<String
>,
56 pub input
: Vec
<StepInput
>,
57 pub output
: Vec
<IntermediateSubstance
>,
65 pub struct IntermediateSubstance
{
67 pub quantity
: Option
<Quantity
>,
71 Ingredient(Ingredient
),
72 IntermediateSubstance(IntermediateSubstance
),