{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "cardEntry": {
      "description": "A single card entry in a decklist",
      "properties": {
        "count": {
          "description": "Number of copies of this card",
          "minimum": 1,
          "type": "integer"
        },
        "oracleId": {
          "description": "Scryfall Oracle ID (UUID) for the card",
          "maxLength": 36,
          "minLength": 36,
          "type": "string"
        },
        "tags": {
          "description": "Optional free-form tags for this card entry",
          "items": {
            "ref": "#cardTag",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "oracleId",
        "count"
      ],
      "type": "object"
    },
    "cardTag": {
      "description": "A free-form tag applied to a card entry",
      "properties": {
        "tag": {
          "maxGraphemes": 128,
          "maxLength": 640,
          "type": "string"
        }
      },
      "required": [
        "tag"
      ],
      "type": "object"
    },
    "main": {
      "description": "MTG Decklist",
      "key": "any",
      "record": {
        "properties": {
          "cards": {
            "description": "Cards included in this deck",
            "items": {
              "ref": "#cardEntry",
              "type": "ref"
            },
            "minLength": 1,
            "type": "array"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "name": {
            "description": "Name of deck",
            "maxGraphemes": 128,
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "cards",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.jackschumann.test.deck",
  "lexicon": 1
}
