{
  "templateName": "Bar Inventory Template: Bottles, Open Fractions and Variance",
  "format": "Editable relational CSV/spreadsheet template",
  "syntheticDataOnly": true,
  "files": [
    "sample.csv",
    "open_bottles.csv",
    "stock_movements.csv"
  ],
  "entities": [
    "products",
    "count_sessions",
    "count_lines",
    "stock_movements"
  ],
  "fieldsByFile": {
    "sample.csv": [
      "session_id",
      "location_id",
      "product_id",
      "product_name",
      "bottle_capacity_ml",
      "sealed_bottles",
      "open_fraction_total",
      "expected_volume_ml",
      "observed_volume_ml",
      "variance_ml",
      "acquisition_cost_per_bottle",
      "data_label"
    ],
    "open_bottles.csv": [
      "open_bottle_id",
      "session_id",
      "product_id",
      "location_id",
      "fraction_remaining",
      "data_label"
    ],
    "stock_movements.csv": [
      "movement_id",
      "session_id",
      "product_id",
      "location_id",
      "movement_type",
      "volume_ml",
      "source_reference",
      "data_label"
    ]
  },
  "validationRules": {
    "positive bottle capacity mL": true,
    "sealed bottles are nonnegative whole numbers": true,
    "each individual open fraction is from 0 through 1": true,
    "count mL = (sealed + sum(open fractions)) x capacity mL": true,
    "variance is observed minus expected and does not prove theft": true
  }
}
