{
    "id": "https://almanak.github.io/schemas/people.aarhusteater.json",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "people.aarhusteater",
    "description": "Schema for all personnel resources at Aarhus Teater.",
    "type": "object",
    "_meta": {
        "indexProperties": [
            "id",
            "domain",
            "schema",
            "occupation",
            "date_from",
            "date_to"
        ],
        "systemProperties": [
            "uuid",
            "id",
            "domain",
            "schema",
            "scheme",
            "created",
            "created_by",
            "updated",
            "updated_by",
            "status"
        ],
        "fulltextProperties": [
            "description"
        ],
        "autocompleteProperties": [
            "display_label"
        ]
    },
    "required": [
        "lastnames",
        "gender"
    ],
    "properties": {
        "uuid": {
            "type": "string",
            "title": "Universal unique identifier",
            "description": "UUID1. Assigned by system",
            "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
        },
        "id": {
            "type": "string",
            "title": "Resourcespecifik ID",
            "description": "9-cifret l\u00f8benummer semi-specifik for resourcetypen. Assigned by system",
            "maxLength": 9,
            "pattern": "^[0-9]{9}$"
        },
        "domain": {
            "type": "string",
            "enum": [
                "records",
                "people",
                "organisations",
                "families",
                "events",
                "places",
                "concepts",
                "things"
            ],
            "title": "Resourcetype",
            "description": "S\u00e6ttes kun n\u00e5r der v\u00e6lges skema til oprettelse. Ellers fastsat."
        },
        "schema": {
            "type": "string",
            "title": "Skema",
            "description": "S\u00e6ttes kun n\u00e5r der v\u00e6lges skema til oprettelse. Ellers fastsat."
        },
        "created": {
            "type": "string",
            "format": "date-time",
            "title": "Skabt",
            "description": "Datetime for skabelse af metadata-ressourcen"
        },
        "created_by": {
            "type": "string",
            "maxLength": 255,
            "title": "Skabt af",
            "description": "Brugernavn/ID p\u00e5 skaber/oploader af metadata-ressourcen"
        },
        "updated": {
            "type": "string",
            "format": "date-time",
            "title": "Senest opdateret",
            "description": "Datetime for seneste opdatering af ressourcen"
        },
        "updated_by": {
            "type": "string",
            "maxLength": 255,
            "title": "Senest opdateret af",
            "description": "Brugernavn p\u00e5 seneste opdaterer af metadata-ressourcen"
        },
        "status": {
            "type": "string",
            "enum": [
                "validated",
                "machine-generated",
                "user-generated"
            ],
            "title": "Status",
            "default": "user-generated"
        },
        "display_label": {
            "type": "string",
            "maxLength": 255,
            "title": "Displaynavn",
            "description": "Den streng, som entiteten repr\u00e6senteres med"
        },
        "description": {
            "type": "string",
            "maxLength": 5000,
            "title": "Beskrivelse"
        },
        "sources": {
            "type": "array",
            "items": {
                "type": "string",
                "maxLength": 255
            },
            "title": "Kilder",
            "description": "URL-links eller enkeltlinje referencer"
        },
        "portrait": {
            "type": "string",
            "maxLength": 255,
            "format": "uri",
            "title": "Portr\u00e6t"
        },
        "firstnames": {
            "type": "array",
            "items": {
                "type": "string",
                "maxLength": 255
            },
            "description": "Alle fornavne i korrekt r\u00e6kkef\u00f8lge",
            "title": "Fornavne"
        },
        "birthname": {
            "type": "string",
            "title": "Pigenavn (f\u00f8dt)",
            "description": "Det eller de efternavne som vedkommende havde f\u00f8r giftem\u00e5l.",
            "maxLength": 255
        },
        "lastnames": {
            "type": "array",
            "items": {
                "type": "string",
                "maxLength": 255
            },
            "title": "Mellem- og efternavne",
            "description": "Alle nuv\u00e6rende mellem og efternavne i korrekt r\u00e6kkef\u00f8lge"
        },
        "gender": {
            "type": "string",
            "enum": [
                "mand",
                "kvinde",
                "ukendt"
            ],
            "title": "K\u00f8n",
            "description": "Selvforklarende"
        },
        "occupation": {
            "type": "array",
            "description": "B\u00f8r v\u00e6re en brance-betegnelse fra DB07",
            "items": {
                "type": "string",
                "maxLength": 255
            },
            "_uniqueItems": true,
            "title": "Erhverv"
        },
        "date_from": {
            "type": "string",
            "format": "date",
            "maxLength": 255,
            "title": "F\u00f8dselsdato (\u00e5\u00e5\u00e5\u00e5-mm-dd)",
            "pattern": "^([0-9]{4})(-([0-9]{2}))?(-([0-9]{2}))?$"
        },
        "place_of_birth": {
            "type": "string",
            "maxLength": 255,
            "title": "F\u00f8dselssted"
        },
        "date_to": {
            "type": "string",
            "format": "date",
            "maxLength": 255,
            "title": "D\u00f8dsdato (\u00e5\u00e5\u00e5\u00e5-mm-dd)",
            "pattern": "^([0-9]{4})(-([0-9]{2}))?(-([0-9]{2}))?$"
        },
        "place_of_death": {
            "type": "string",
            "maxLength": 255,
            "title": "D\u00f8dssted"
        },
        "ext_data": {
            "type": "object",
            "title": "Udvided metadata",
            "properties": {
                "original_id": {
                    "type": "string",
                    "maxLength": 255,
                    "title": "Originalt ID"
                },
                "place_of_education": {
                    "type": "string",
                    "maxLength": 255,
                    "title": "Uddannelsessted"
                },
                "year_of_graduation": {
                    "type": "string",
                    "pattern": "^[0-9]{4}$",
                    "title": "Uddannelses\u00e5r"
                }
            }
        }
    }
}