{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Willow Event Kitchen operating model v1",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "industry": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "workflows": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "asOf": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "tables": {
      "type": "object",
      "properties": {
        "purchases": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "purchase_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "supplier_id": {
                    "type": "string"
                  },
                  "ingredient_id": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "unit_price": {
                    "type": "number"
                  },
                  "total_price": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "purchase_id",
                  "supplier_id",
                  "ingredient_id",
                  "location_id",
                  "date",
                  "quantity",
                  "unit",
                  "unit_price",
                  "total_price",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "suppliers": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {}
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "supplier_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "supplier_id",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "ingredients": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {}
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ingredient_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "opening_quantity": {
                    "type": "number"
                  },
                  "reorder_quantity": {
                    "type": "number"
                  }
                },
                "required": [
                  "ingredient_id",
                  "name",
                  "unit",
                  "currency",
                  "opening_quantity",
                  "reorder_quantity"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "locations": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {}
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "location_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "location_id",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "menu": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {}
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "menu_item_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string"
                  },
                  "price": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "menu_item_id",
                  "name",
                  "price",
                  "currency",
                  "active"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "recipes": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "recipe_line_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "menu_item_id": {
                    "type": "string"
                  },
                  "ingredient_id": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "yield_percent": {
                    "type": "number"
                  }
                },
                "required": [
                  "recipe_line_id",
                  "menu_item_id",
                  "ingredient_id",
                  "quantity",
                  "unit",
                  "yield_percent"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "sales": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "sales_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "date": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "menu_item_id": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  },
                  "unit_price": {
                    "type": "number"
                  },
                  "discount": {
                    "type": "number"
                  },
                  "net_sales": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "sales_id",
                  "date",
                  "location_id",
                  "menu_item_id",
                  "quantity",
                  "unit_price",
                  "discount",
                  "net_sales",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "inventory": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "count_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "ingredient_id": {
                    "type": "string"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "opening": {
                    "type": "number"
                  },
                  "received": {
                    "type": "number"
                  },
                  "used": {
                    "type": "number"
                  },
                  "waste": {
                    "type": "number"
                  },
                  "closing": {
                    "type": "number"
                  }
                },
                "required": [
                  "count_id",
                  "ingredient_id",
                  "unit",
                  "opening",
                  "received",
                  "used",
                  "waste",
                  "closing"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "reviews": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {}
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "review_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "source": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "rating": {
                    "type": "number"
                  },
                  "review": {
                    "type": "string"
                  },
                  "location": {
                    "type": "string"
                  }
                },
                "required": [
                  "review_id",
                  "source",
                  "date",
                  "rating",
                  "review",
                  "location"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "modifiers": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "modifier_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "menu_item_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "price": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "modifier_id",
                  "menu_item_id",
                  "name",
                  "price",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "sales_modifiers": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "applied_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sales_id": {
                    "type": "string"
                  },
                  "modifier_id": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  },
                  "unit_price": {
                    "type": "number"
                  },
                  "total": {
                    "type": "number"
                  }
                },
                "required": [
                  "applied_id",
                  "sales_id",
                  "modifier_id",
                  "quantity",
                  "unit_price",
                  "total"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "refunds": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "refund_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sales_id": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "refund_id",
                  "sales_id",
                  "date",
                  "quantity",
                  "amount",
                  "reason",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "guests": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {}
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "guest_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "guest_id",
                  "name",
                  "email"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "reservations": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "reservation_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "guest_id": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "time": {
                    "type": "string"
                  },
                  "party_size": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string"
                  }
                },
                "required": [
                  "reservation_id",
                  "guest_id",
                  "location_id",
                  "date",
                  "time",
                  "party_size",
                  "status"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "staff": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {}
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "employee_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "hourly_rate": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "employee_id",
                  "name",
                  "role",
                  "hourly_rate",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "staffing_shifts": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "shift_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "employee_id": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "hours": {
                    "type": "number"
                  },
                  "hourly_rate": {
                    "type": "number"
                  },
                  "base_pay": {
                    "type": "number"
                  }
                },
                "required": [
                  "shift_id",
                  "employee_id",
                  "location_id",
                  "date",
                  "hours",
                  "hourly_rate",
                  "base_pay"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "inventory_movements": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "movement_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "ingredient_id": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "opening": {
                    "type": "number"
                  },
                  "received": {
                    "type": "number"
                  },
                  "used": {
                    "type": "number"
                  },
                  "waste": {
                    "type": "number"
                  },
                  "closing": {
                    "type": "number"
                  }
                },
                "required": [
                  "movement_id",
                  "ingredient_id",
                  "date",
                  "unit",
                  "opening",
                  "received",
                  "used",
                  "waste",
                  "closing"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        },
        "menu_price_changes": {
          "type": "object",
          "properties": {
            "primaryKey": {
              "type": "string"
            },
            "foreignKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string"
                  },
                  "table": {
                    "type": "string"
                  },
                  "targetColumn": {
                    "type": "string"
                  }
                },
                "required": [
                  "column",
                  "table",
                  "targetColumn"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "price_change_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "menu_item_id": {
                    "type": "string"
                  },
                  "effective_date": {
                    "type": "string"
                  },
                  "old_price": {
                    "type": "number"
                  },
                  "proposed_price": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  }
                },
                "required": [
                  "price_change_id",
                  "menu_item_id",
                  "effective_date",
                  "old_price",
                  "proposed_price",
                  "status",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "primaryKey",
            "foreignKeys",
            "rows"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "purchases",
        "suppliers",
        "ingredients",
        "locations",
        "menu",
        "recipes",
        "sales",
        "inventory",
        "reviews",
        "modifiers",
        "sales_modifiers",
        "refunds",
        "guests",
        "reservations",
        "staff",
        "staffing_shifts",
        "inventory_movements",
        "menu_price_changes"
      ],
      "additionalProperties": false
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "calculation": {
            "type": "string"
          },
          "formula": {
            "type": "object",
            "properties": {
              "op": {
                "type": "string"
              },
              "table": {
                "type": "string"
              },
              "column": {
                "type": "string"
              }
            },
            "required": [
              "op",
              "table"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "label",
          "value",
          "unit",
          "calculation",
          "formula"
        ],
        "additionalProperties": false
      }
    },
    "chart": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "points": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "value": {
                "type": "number"
              }
            },
            "required": [
              "label",
              "value"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "title",
        "unit",
        "points"
      ],
      "additionalProperties": false
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "restaurant": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "slug",
    "title",
    "industry",
    "description",
    "workflows",
    "asOf",
    "source",
    "tables",
    "metrics",
    "chart",
    "notes",
    "restaurant"
  ],
  "additionalProperties": false,
  "x-relationalRules": [
    {
      "table": "purchases",
      "unique": "purchase_id",
      "foreignKeys": [
        {
          "column": "supplier_id",
          "table": "suppliers",
          "targetColumn": "supplier_id"
        },
        {
          "column": "ingredient_id",
          "table": "ingredients",
          "targetColumn": "ingredient_id"
        },
        {
          "column": "location_id",
          "table": "locations",
          "targetColumn": "location_id"
        }
      ]
    },
    {
      "table": "suppliers",
      "unique": "supplier_id",
      "foreignKeys": []
    },
    {
      "table": "ingredients",
      "unique": "ingredient_id",
      "foreignKeys": []
    },
    {
      "table": "locations",
      "unique": "location_id",
      "foreignKeys": []
    },
    {
      "table": "menu",
      "unique": "menu_item_id",
      "foreignKeys": []
    },
    {
      "table": "recipes",
      "unique": "recipe_line_id",
      "foreignKeys": [
        {
          "column": "menu_item_id",
          "table": "menu",
          "targetColumn": "menu_item_id"
        },
        {
          "column": "ingredient_id",
          "table": "ingredients",
          "targetColumn": "ingredient_id"
        }
      ]
    },
    {
      "table": "sales",
      "unique": "sales_id",
      "foreignKeys": [
        {
          "column": "menu_item_id",
          "table": "menu",
          "targetColumn": "menu_item_id"
        },
        {
          "column": "location_id",
          "table": "locations",
          "targetColumn": "location_id"
        }
      ]
    },
    {
      "table": "inventory",
      "unique": "count_id",
      "foreignKeys": [
        {
          "column": "ingredient_id",
          "table": "ingredients",
          "targetColumn": "ingredient_id"
        }
      ]
    },
    {
      "table": "reviews",
      "unique": "review_id",
      "foreignKeys": []
    },
    {
      "table": "modifiers",
      "unique": "modifier_id",
      "foreignKeys": [
        {
          "column": "menu_item_id",
          "table": "menu",
          "targetColumn": "menu_item_id"
        }
      ]
    },
    {
      "table": "sales_modifiers",
      "unique": "applied_id",
      "foreignKeys": [
        {
          "column": "sales_id",
          "table": "sales",
          "targetColumn": "sales_id"
        },
        {
          "column": "modifier_id",
          "table": "modifiers",
          "targetColumn": "modifier_id"
        }
      ]
    },
    {
      "table": "refunds",
      "unique": "refund_id",
      "foreignKeys": [
        {
          "column": "sales_id",
          "table": "sales",
          "targetColumn": "sales_id"
        }
      ]
    },
    {
      "table": "guests",
      "unique": "guest_id",
      "foreignKeys": []
    },
    {
      "table": "reservations",
      "unique": "reservation_id",
      "foreignKeys": [
        {
          "column": "guest_id",
          "table": "guests",
          "targetColumn": "guest_id"
        },
        {
          "column": "location_id",
          "table": "locations",
          "targetColumn": "location_id"
        }
      ]
    },
    {
      "table": "staff",
      "unique": "employee_id",
      "foreignKeys": []
    },
    {
      "table": "staffing_shifts",
      "unique": "shift_id",
      "foreignKeys": [
        {
          "column": "employee_id",
          "table": "staff",
          "targetColumn": "employee_id"
        },
        {
          "column": "location_id",
          "table": "locations",
          "targetColumn": "location_id"
        }
      ]
    },
    {
      "table": "inventory_movements",
      "unique": "movement_id",
      "foreignKeys": [
        {
          "column": "ingredient_id",
          "table": "ingredients",
          "targetColumn": "ingredient_id"
        }
      ]
    },
    {
      "table": "menu_price_changes",
      "unique": "price_change_id",
      "foreignKeys": [
        {
          "column": "menu_item_id",
          "table": "menu",
          "targetColumn": "menu_item_id"
        }
      ]
    }
  ]
}
