{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "entry": {
      "properties": {
        "date": {
          "description": "yyyyMMdd",
          "maxLength": 8,
          "minLength": 8,
          "type": "string"
        },
        "quantity": {
          "description": "Decimal number as a string; Lexicon has no float type.",
          "maxLength": 32,
          "type": "string"
        }
      },
      "required": [
        "date",
        "quantity"
      ],
      "type": "object"
    },
    "main": {
      "description": "One year of pixels for a graph. The record key is '<graphId>:<yyyy>'.",
      "key": "any",
      "record": {
        "properties": {
          "entries": {
            "items": {
              "ref": "#entry",
              "type": "ref"
            },
            "maxLength": 366,
            "type": "array"
          },
          "graph": {
            "description": "Graph ID; the record key of a me.jgs.pix.graph record in the same repo.",
            "format": "tid",
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          },
          "year": {
            "maximum": 9999,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "graph",
          "year",
          "entries"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "me.jgs.pix.pixels",
  "lexicon": 1
}
