{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "title": "perform_item_change_command",
    "description": "Command schema to issue a change in a entity triggered by a bulk-edit operation.",
    "additionalProperties": false,
    "required": [
        "table_name",
        "action",
        "stringified_condition",
        "stringified_payload"
    ],
    "properties": {
        "table_name": {
            "type": "string",
            "minLength": 1,
            "pattern": "^$|.*\\S.*",
            "description": "The string has a minimum length of one character and it cannot consist of only whitespace characters."
        },
        "action": {
            "type": "string",
            "enum": [
                "SET_FIELD_VALUES",
                "CLEAR_RELATED_ENTITIES",
                "REMOVE_RELATED_ENTITY",
                "ADD_RELATED_ENTITY"
            ],
            "title": "bulk_action_type",
            "description": "The type of action to perform on the database table."
        },
        "stringified_condition": {
            "type": "string",
            "minLength": 1,
            "pattern": "^$|.*\\S.*",
            "description": "The string has a minimum length of one character and it cannot consist of only whitespace characters."
        },
        "stringified_payload": {
            "type": "string",
            "minLength": 1,
            "pattern": "^$|.*\\S.*",
            "description": "The string has a minimum length of one character and it cannot consist of only whitespace characters."
        }
    }
}
