{
"id": "cards.openstacks.mtg.deck",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"name",
"createdAt"
],
"properties": {
"name": {
"type": "string",
"maxLength": 256,
"description": "Deck name"
},
"format": {
"type": "string",
"description": "Deck format",
"knownValues": [
"standard",
"modern",
"legacy",
"vintage",
"pioneer",
"commander",
"pauper",
"brawl",
"historic",
"alchemy",
"oathbreaker",
"premodern",
"casual"
]
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "When this deck was created"
},
"mainboard": {
"type": "array",
"items": {
"ref": "#deckEntry",
"type": "ref"
},
"description": "Main deck cards"
},
"sideboard": {
"type": "array",
"items": {
"ref": "#deckEntry",
"type": "ref"
},
"description": "Sideboard cards"
},
"sourceUrl": {
"type": "string",
"format": "uri",
"description": "Original source URL if imported (e.g., Moxfield link)"
},
"updatedAt": {
"type": "string",
"format": "datetime",
"description": "When this deck was last updated"
},
"commanders": {
"type": "array",
"items": {
"ref": "#deckEntry",
"type": "ref"
},
"description": "Commander(s) for Commander format"
},
"companions": {
"type": "array",
"items": {
"ref": "#deckEntry",
"type": "ref"
},
"description": "Companion(s)"
},
"maybeboard": {
"type": "array",
"items": {
"ref": "#deckEntry",
"type": "ref"
},
"description": "Cards being considered"
},
"description": {
"type": "string",
"maxLength": 5000,
"description": "Deck description / primer"
}
}
},
"description": "A Magic: The Gathering deck"
},
"deckEntry": {
"type": "object",
"required": [
"card",
"quantity"
],
"properties": {
"card": {
"type": "string",
"format": "at-uri",
"description": "AT URI reference to a card record"
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Number of copies"
}
},
"description": "A card in a deck with quantity"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}