{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/EmployeeRole/v1/schema.json",
  "title": "EmployeeRole",
  "description": "Objects Grid EmployeeRole Object. A person's role at a business: the position, since and until when, the Services they provide, their qualifications and working hours. A private record: it has no JSON-LD document. Modeled in compliance with https://schema.org/EmployeeRole; employee, employer, providesService, hasCredential and workSchedule are ObjectsGrid's own fields.",
  "x-objectsgrid-jsonLd": false,
  "type": "object",
  "properties": {
    "at_context": {
      "description": "Schema context",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "https://schema.org"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "EmployeeRole"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This EmployeeRole's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>: its JSON-LD @id, which References point to. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "description": "The unique identifier for EmployeeRole. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "identifier": {
      "description": "The unique identifier for EmployeeRole. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "url": {
      "description": "This EmployeeRole URL. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1,
      "readOnly": true
    },
    "employee": {
      "x-objectsgrid-erasure": "keep",
      "description": "The Person in the role",
      "x-objectsgrid-rangeIncludes": [
        "Person"
      ],
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
    },
    "employer": {
      "description": "The Organization or local business (Place) they work for",
      "x-objectsgrid-rangeIncludes": [
        "Organization",
        "Place"
      ],
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
    },
    "roleName": {
      "description": "The role, e.g. 'Stylist'",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "namedPosition": {
      "description": "The position's name in the business, e.g. 'Senior stylist'",
      "type": [
        "string",
        "null"
      ]
    },
    "startDate": {
      "description": "Since when",
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "endDate": {
      "description": "Until when",
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "providesService": {
      "description": "The Services they provide",
      "x-objectsgrid-rangeIncludes": [
        "Service"
      ],
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
      },
      "maxItems": 100
    },
    "hasCredential": {
      "description": "Their qualifications",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/EducationalOccupationalCredential/v1/schema.json"
      },
      "maxItems": 50
    },
    "workSchedule": {
      "description": "When they work: Schedules with days, times and time zone, e.g. Mondays 09:00-17:00 Europe/Berlin, every other week, except holidays. ObjectsGrid's own field.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Schedule/v1/schema.json"
      },
      "maxItems": 50
    },
    "tags": {
      "description": "Tags an ABAC policy can decide on. A name may repeat; the same name and value appear once. Every stored object has them: created empty when not sent, kept by a replacement (PUT) that does not mention them, unchanged by a patch that does not mention them, cleared by null or [].",
      "type": "array",
      "default": [],
      "uniqueItems": true,
      "maxItems": 50,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
      }
    },
    "meta": {
      "description": "System-managed metadata for the object (version, audit fields). Assigned by the server.",
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ObjectMeta/v1/schema.json",
      "readOnly": true
    }
  },
  "required": [
    "employee",
    "employer"
  ],
  "unevaluatedProperties": false
}
