File size: 2,996 Bytes
360b354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
json_schema = {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "RestaurantOrderData",
    "type": "object",
    "properties": {
        "restaurant_name": {"type": "string", "description": "Name of the restaurant"},
        "number_of_times_item_ordered": {
            "type": "object",
            "description": "Number of times each item has been ordered. Each key is item name and value is number of times it get ordered",
            "additionalProperties": {
                "type": "integer",
                "description": "Count of times the item was ordered",
            },
        },
        "number_of_order_daywise": {
            "type": "object",
            "description": "Number of orders received each day. Each key is date and value is number of orders",
            "additionalProperties": {
                "type": "integer",
                "description": "Count of orders for the specific day",
            },
        },
        "number_of_order_cancelled": {
            "type": "object",
            "description": "Number of orders received each day. Each key is date and value is number of orders get canceled",
            "additionalProperties": {
                "type": "integer",
                "description": "Count of canceled orders for the specific day",
            },
        },
        "number_of_order_completed": {
            "type": "object",
            "description": "Number of orders received each day. Each key is date and value is number of orders get completed",
            "additionalProperties": {
                "type": "integer",
                "description": "Count of completed orders for the specific day",
            },
        },
        "number_of_order_aggregator_wise": {
            "type": "object",
            "description": "Number of orders received from each aggregator. Each key is aggregator name and value is number of orders get on that specific aggregator",
            "additionalProperties": {
                "type": "integer",
                "description": "Count of orders for the specific aggregator",
            },
        },
        "total_revenue": {"type": "number", "description": "Total revenue generated"},
        "total_orders": {"type": "integer", "description": "Total number of orders"},
        "revenue_daywise": {
            "type": "object",
            "description": "Revenue generated each day. Each key is date and value is total revenue generated on that specific date",
            "additionalProperties": {
                "type": "number",
                "description": "Revenue for the specific day",
            },
        },
    },
    "required": [
        "restaurant_name",
        "number_of_times_item_ordered",
        "number_of_order_daywise",
        "number_of_order_canceled",
        "number_of_order_completed",
        "number_of_order_aggregator_wise",
        "total_revenue",
        "total_orders",
        "revenue_daywise",
    ],
}