{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Pantry and role access level that user has",
    "title": "User role in pantry",
    "type": "object",
    "properties": {
        "pantryId": {
            "description": "Unique ID of food pantry",
            "type": "string",
            "minLength": 1
        },
        "userId": {
            "description": "Unique ID of user",
            "type": "string",
            "minLength": 1
        },
        "role": {
            "description": "Role of the user",
            "type": "string",
            "enum": [
                "administrator",
                "contributor",
                "viewer"
            ]
        },
        "createdAt": {
            "description": "[Output only] Creation time of the user role",
            "type": "string",
            "format": "date-time",
            "minLength": 1
        },
        "createdBy": {
            "description": "[Output only] Creator of the user role",
            "type": "string",
            "minLength": 1
        },
        "updatedAt": {
            "description": "[Output only] Last modification time of the user role",
            "type": "string",
            "format": "date-time",
            "minLength": 1
        },
        "updatedBy": {
            "description": "[Output only] User to last modify the user role",
            "type": "string",
            "minLength": 1
        }
    },
    "required": [
        "pantryId",
        "role"
    ]
}