{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "cardItem": {
      "description": "A card saved to the list.",
      "properties": {
        "addedAt": {
          "description": "Timestamp when this item was added to the list.",
          "format": "datetime",
          "type": "string"
        },
        "ref": {
          "description": "Reference to the card (scryfall printing + oracle card).",
          "ref": "com.deckbelcher.defs#cardRef",
          "type": "ref"
        }
      },
      "required": [
        "ref",
        "addedAt"
      ],
      "type": "object"
    },
    "deckItem": {
      "description": "A deck saved to the list.",
      "properties": {
        "addedAt": {
          "description": "Timestamp when this item was added to the list.",
          "format": "datetime",
          "type": "string"
        },
        "ref": {
          "description": "Reference to the deck record.",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "ref",
        "addedAt"
      ],
      "type": "object"
    },
    "main": {
      "description": "A curated list of cards and/or decks.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "description": "Timestamp when the list was created.",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Description of the list.",
            "ref": "com.deckbelcher.richtext#document",
            "type": "ref"
          },
          "items": {
            "description": "Items in the list.",
            "items": {
              "refs": [
                "#cardItem",
                "#deckItem"
              ],
              "type": "union"
            },
            "type": "array"
          },
          "name": {
            "description": "Name of the list.",
            "maxGraphemes": 128,
            "maxLength": 1280,
            "type": "string"
          },
          "updatedAt": {
            "description": "Timestamp when the list was last updated.",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "name",
          "items",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.deckbelcher.collection.list",
  "lexicon": 1
}
