{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A badge earned by a user, awarded by the postgame system based on activity",
      "key": "any",
      "record": {
        "properties": {
          "badgeId": {
            "description": "Unique identifier for the badge type, used as the record key. Badge types and their criteria are defined by the postgame system",
            "maxLength": 128,
            "type": "string"
          },
          "createdAt": {
            "description": "When the badge was earned",
            "format": "datetime",
            "type": "string"
          },
          "subject": {
            "description": "Optional AT-URI of the record that triggered this badge (e.g. the game entry)",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "badgeId",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "at.postgame.badge",
  "lexicon": 1
}
