{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shapes.penny.coop/registration-review/1.0.0/schema.json",
  "title": "Registration review",
  "description": "A researcher’s registration decision and notes for a participant.",
  "type": "object",
  "properties": {
    "title": {
      "title": "Review title",
      "type": "string",
      "x-penny": {
        "field": "text"
      }
    },
    "participantId": {
      "title": "Participant",
      "type": "string",
      "description": "A project-local record reference, normally typeName/recordId. The referenced record is not embedded.",
      "x-penny": {
        "field": "reference",
        "to": [
          "participant"
        ]
      }
    },
    "reviewer": {
      "title": "Reviewer",
      "type": "string",
      "x-penny": {
        "field": "text"
      }
    },
    "decision": {
      "title": "Decision",
      "type": "string",
      "enum": [
        "pending",
        "clarification",
        "approved",
        "declined"
      ],
      "x-penny": {
        "field": "text",
        "input": "select",
        "options": [
          "pending",
          "clarification",
          "approved",
          "declined"
        ]
      }
    },
    "notes": {
      "title": "Reason for decision",
      "type": "string",
      "x-penny": {
        "field": "textarea",
        "input": "textarea"
      }
    }
  },
  "x-penny": {
    "shape": "registration-review",
    "version": "1.0.0",
    "source": "app/src/lib/design/project-model.js",
    "sourceName": "registrationReview",
    "kind": "record",
    "plural": "Registration reviews",
    "icon": "ScanEye",
    "defaultVisibility": "private",
    "publishable": false,
    "fieldOrder": [
      "title",
      "participantId",
      "reviewer",
      "decision",
      "notes"
    ],
    "sensitive": true
  }
}
