database.db_constants

Constants for database lookup tables.

 1"""Constants for database lookup tables."""
 2
 3from internal.queries.models import ChartType
 4
 5CATEGORIES = [
 6    {"cat_id": 1, "name": "Bakery", "coefficient": 1},
 7    {"cat_id": 2, "name": "Produce", "coefficient": 1},
 8    {"cat_id": 3, "name": "Deli", "coefficient": 1},
 9    {"cat_id": 4, "name": "Prepared Meals", "coefficient": 1},
10    {"cat_id": 5, "name": "Dairy", "coefficient": 1},
11    {"cat_id": 6, "name": "Drinks", "coefficient": 1},
12    {"cat_id": 7, "name": "Pantry", "coefficient": 1},
13    {"cat_id": 8, "name": "Snacks", "coefficient": 1},
14]
15
16ALLERGENS = {1: "Gluten", 2: "Dairy", 3: "Nuts", 4: "Soy", 5: "Eggs", 6: "Sesame"}
17
18BADGES = [
19    {"badge_id": 1, "name": "Green Starter", "description": "Rescue your first meal"},
20    {
21        "badge_id": 2,
22        "name": "Local Hero",
23        "description": "Rescue from multiple different sellers",
24    },
25    {
26        "badge_id": 3,
27        "name": "Variety explorer",
28        "description": "Rescue food from multiple categories",
29    },
30    {
31        "badge_id": 4,
32        "name": "Food Savior",
33        "description": "Save food multiple days in a row",
34    },
35    {"badge_id": 5, "name": "Sweet Tooth", "description": "Save multiple desserts"},
36    {
37        "badge_id": 6,
38        "name": "CO2 Cutter",
39        "description": "Save significant amounts of CO2",
40    },
41    {
42        "badge_id": 7,
43        "name": "Right On Time",
44        "description": "Consistently save meals without no-shows",
45    },
46]
47
48ANALYTICS_GRAPHS_TYPES = [
49    {
50        "graph_type_id": 1,
51        "chart_type": ChartType.MULTI_LINE,
52        "graph_summary": "Weekly Sales vs Posted",
53        "x_axis_label": "Timeline",
54        "y_axis_label": "Reservations",
55    },
56    {
57        "graph_type_id": 2,
58        "chart_type": ChartType.PIE,
59        "graph_summary": "Sell Through Rate",
60        "x_axis_label": None,
61        "y_axis_label": None,
62    },
63    {
64        "graph_type_id": 3,
65        "chart_type": ChartType.BAR,
66        "graph_summary": "Category Distribution",
67        "x_axis_label": None,
68        "y_axis_label": "Reservations",
69    },
70    {
71        "graph_type_id": 4,
72        "chart_type": ChartType.BAR,
73        "graph_summary": "Time Window Distribution",
74        "x_axis_label": None,
75        "y_axis_label": "Reservations",
76    },
77    {
78        "graph_type_id": 5,
79        "chart_type": ChartType.MULTI_LINE,
80        "graph_summary": "Forecast vs Posted",
81        "x_axis_label": "Bundle Date",
82        "y_axis_label": "Quantity",
83    },
84]
CATEGORIES = [{'cat_id': 1, 'name': 'Bakery', 'coefficient': 1}, {'cat_id': 2, 'name': 'Produce', 'coefficient': 1}, {'cat_id': 3, 'name': 'Deli', 'coefficient': 1}, {'cat_id': 4, 'name': 'Prepared Meals', 'coefficient': 1}, {'cat_id': 5, 'name': 'Dairy', 'coefficient': 1}, {'cat_id': 6, 'name': 'Drinks', 'coefficient': 1}, {'cat_id': 7, 'name': 'Pantry', 'coefficient': 1}, {'cat_id': 8, 'name': 'Snacks', 'coefficient': 1}]
ALLERGENS = {1: 'Gluten', 2: 'Dairy', 3: 'Nuts', 4: 'Soy', 5: 'Eggs', 6: 'Sesame'}
BADGES = [{'badge_id': 1, 'name': 'Green Starter', 'description': 'Rescue your first meal'}, {'badge_id': 2, 'name': 'Local Hero', 'description': 'Rescue from multiple different sellers'}, {'badge_id': 3, 'name': 'Variety explorer', 'description': 'Rescue food from multiple categories'}, {'badge_id': 4, 'name': 'Food Savior', 'description': 'Save food multiple days in a row'}, {'badge_id': 5, 'name': 'Sweet Tooth', 'description': 'Save multiple desserts'}, {'badge_id': 6, 'name': 'CO2 Cutter', 'description': 'Save significant amounts of CO2'}, {'badge_id': 7, 'name': 'Right On Time', 'description': 'Consistently save meals without no-shows'}]
ANALYTICS_GRAPHS_TYPES = [{'graph_type_id': 1, 'chart_type': <ChartType.MULTI_LINE: 'multi_line'>, 'graph_summary': 'Weekly Sales vs Posted', 'x_axis_label': 'Timeline', 'y_axis_label': 'Reservations'}, {'graph_type_id': 2, 'chart_type': <ChartType.PIE: 'pie'>, 'graph_summary': 'Sell Through Rate', 'x_axis_label': None, 'y_axis_label': None}, {'graph_type_id': 3, 'chart_type': <ChartType.BAR: 'bar'>, 'graph_summary': 'Category Distribution', 'x_axis_label': None, 'y_axis_label': 'Reservations'}, {'graph_type_id': 4, 'chart_type': <ChartType.BAR: 'bar'>, 'graph_summary': 'Time Window Distribution', 'x_axis_label': None, 'y_axis_label': 'Reservations'}, {'graph_type_id': 5, 'chart_type': <ChartType.MULTI_LINE: 'multi_line'>, 'graph_summary': 'Forecast vs Posted', 'x_axis_label': 'Bundle Date', 'y_axis_label': 'Quantity'}]