{
  "lexicon": 1,
  "id": "net.bisks.cremalog.review",
  "defs": {
    "main": {
      "type": "record",
      "description": "One latte (or other espresso drink) review, written by the drinker. A person's log is every review record in their own repo, newest first — see public/lib/log.js. Written and read by cremalog (https://cremalog.bisks.net).",
      "key": "tid",
      "record": {
        "type": "object",
        "required": ["drink", "rating", "reviewedAt"],
        "properties": {
          "drink": {
            "type": "string",
            "maxLength": 100,
            "description": "What was ordered, e.g. \"banana bread matcha latte\"."
          },
          "shop": {
            "type": "string",
            "maxLength": 100,
            "description": "Optional: where it was from."
          },
          "rating": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Rating out of 10, stored ×10 for one decimal place of precision (e.g. 75 = 7.5/10)."
          },
          "notes": {
            "type": "string",
            "maxLength": 300,
            "description": "Optional short review text."
          },
          "reviewedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this latte was had, as an ISO 8601 datetime."
          }
        }
      }
    }
  }
}
