{
  "$id": "https://gitea.pangea.org/trustchain-oc1-orchestral/schemas/membership-card-schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "name": "MembershipCard",
  "description": "MembershipCard credential using JsonSchema",
  "type": "object",
  "properties": {
    "credentialSubject": {
      "type": "object",
      "properties": {
        "organisation": {
          "type": "string"
        },
        "membershipType": {
          "type": "string"
        },
        "affiliatedSince": {
          "type": "string",
          "format": "date-time"
        },
        "affiliatedUntil": {
          "type": "string",
          "format": "date-time"
        },
        "typeOfPerson": {
          "type": "string",
          "enum": [
            "individual",
            "org"
          ]
        },
        "identityDocType": {
          "type": "string",
          "enum": [
            "DNI",
            "NIF",
            "NIE",
            "PASSPORT"
          ]
        },
        "identityNumber": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "surnames": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        }
      },
      "required": [
        "organisation",
        "affiliatedSince",
        "typeOfPerson",
        "name",
        "surnames",
        "email"
      ]
    }
  }
}