module/dietary_habit.py¶
module.dietary_habit ¶
DietaryHabit
DietaryHabitItemsName ¶
Bases: Enum
DietaryHabitItemsName
Attributes:
A000 (str): `葷食`
A001 (str): `葷食但不能吃牛`
A002 (str): `葷食但不能吃豬`
B000 (str): `素食`
C000 (str): `對花生、蠶豆過敏`
D000 (str): `蔥蒜過敏`
E000 (str): `海鮮過敏`
Tip
The value will as the selection lists be displayed at front.
Source code in module/dietary_habit.py
DietaryHabitItemsValue ¶
Bases: Enum
DietaryHabitItemsValue
Attributes:
A000 (str): `0.000`
A001 (str): `0.001`
A002 (str): `0.002`
B000 (str): `1.000`
C000 (str): `2.000`
D000 (str): `3.000`
E000 (str): `4.000`
Tip
The value will as the value be saved into collection.
Source code in module/dietary_habit.py
valid_dietary_value ¶
valid dietary data
Parameters:
Name | Type | Description | Default |
---|---|---|---|
items_no |
list
|
List of DietaryHabitItemsValue's value. |
required |
Returns:
Type | Description |
---|---|
list[DietaryHabitItemsValue]
|
Return the only valid datas. |