{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A mock exam review with overall score, target judgement, subjects, sections, and reflection actions. rkey is the client's localId (see the `localId` property below), written via putRecord — this makes a retried push idempotent (a network-timeout retry overwrites the same rkey instead of creating a duplicate) rather than requiring the client to track which pushes already succeeded.",
      "key": "any",
      "record": {
        "properties": {
          "applicantRank": {
            "minimum": 0,
            "type": "integer"
          },
          "attemptLabel": {
            "maxLength": 300,
            "type": "string"
          },
          "attemptLabelRemoved": {
            "description": "Explicitly cleared attemptLabel; distinguishes user removal from older clients omitting the field.",
            "type": "boolean"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "date": {
            "description": "Exam calendar date in YYYY-MM-DD format; not a timestamp.",
            "type": "string"
          },
          "examName": {
            "maxLength": 600,
            "type": "string"
          },
          "firstChoiceGap": {
            "type": "integer"
          },
          "firstChoiceJudgement": {
            "knownValues": [
              "A",
              "B",
              "C",
              "D",
              "E",
              "Z"
            ],
            "type": "string"
          },
          "firstChoiceTargetScore": {
            "minimum": 0,
            "type": "integer"
          },
          "goal": {
            "maxLength": 1500,
            "type": "string"
          },
          "localId": {
            "description": "Matches local MockExamReview.id and equals this record's own rkey (see the record-level description above).",
            "maxLength": 100,
            "type": "string"
          },
          "pdsRkey": {
            "description": "Canonical migrated TID rkey. It points to a create-only copy while the legacy source record remains readable.",
            "format": "tid",
            "type": "string"
          },
          "scaleVersion": {
            "description": "Current writers emit 1 and store totalDeviation, subject deviation, and section averageScore as integers scaled by 10. Existing records without this marker use the same scale.",
            "minimum": 1,
            "type": "integer"
          },
          "subjects": {
            "items": {
              "ref": "#subject",
              "type": "ref"
            },
            "maxLength": 30,
            "type": "array"
          },
          "totalApplicants": {
            "minimum": 0,
            "type": "integer"
          },
          "totalDeviation": {
            "type": "integer"
          },
          "totalFullScore": {
            "minimum": 1,
            "type": "integer"
          },
          "totalScore": {
            "minimum": 0,
            "type": "integer"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "localId",
          "examName",
          "date",
          "totalScore",
          "totalFullScore",
          "subjects",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "section": {
      "properties": {
        "averageScore": {
          "type": "integer"
        },
        "fieldName": {
          "maxLength": 600,
          "type": "string"
        },
        "fullScore": {
          "minimum": 1,
          "type": "integer"
        },
        "id": {
          "maxLength": 100,
          "type": "string"
        },
        "longAction": {
          "maxLength": 1500,
          "type": "string"
        },
        "lossCause": {
          "maxLength": 300,
          "type": "string"
        },
        "mentalState": {
          "maxLength": 1500,
          "type": "string"
        },
        "nextTargetScore": {
          "minimum": 0,
          "type": "integer"
        },
        "score": {
          "minimum": 0,
          "type": "integer"
        },
        "shortAction": {
          "maxLength": 1500,
          "type": "string"
        },
        "timePlanActual": {
          "maxLength": 1500,
          "type": "string"
        }
      },
      "required": [
        "id",
        "fieldName",
        "score",
        "fullScore"
      ],
      "type": "object"
    },
    "subject": {
      "properties": {
        "color": {
          "maxLength": 7,
          "type": "string"
        },
        "deviation": {
          "type": "integer"
        },
        "id": {
          "maxLength": 100,
          "type": "string"
        },
        "name": {
          "maxLength": 300,
          "type": "string"
        },
        "sections": {
          "items": {
            "ref": "#section",
            "type": "ref"
          },
          "maxLength": 80,
          "type": "array"
        },
        "subjectId": {
          "maxLength": 100,
          "type": "string"
        },
        "subjectName": {
          "maxLength": 300,
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "sections"
      ],
      "type": "object"
    }
  },
  "id": "app.studynext.mockExam",
  "lexicon": 1
}
