{ "$id": "resource-instance-database", "type": "object", "additionalProperties": false, "required": [ "_id", "name", "description", "modelId", "instanceData", "lastAction", "created", "createdBy", "lastUpdated", "lastUpdatedBy" ], "properties": { "_id": { "$ref": "common-db#/definitions/document-identifier" }, "name": { "$ref": "resource-instance-common#/definitions/name" }, "description": { "$ref": "resource-instance-common#/definitions/description" }, "modelId": { "$ref": "common-db#/definitions/document-identifier" }, "instanceData": { "$ref": "resource-instance-common#/definitions/instanceData" }, "lastAction": { "$ref": "#/definitions/lastAction" }, "created": { "$ref": "common-db#/definitions/created" }, "createdBy": { "$ref": "#/definitions/createdBy" }, "lastUpdated": { "$ref": "common-db#/definitions/lastUpdated" }, "lastUpdatedBy": { "$ref": "#/definitions/lastUpdatedBy" } }, "definitions": { "createdBy": { "description": "The account identifier of the user who created this resource instance", "$ref": "common-db#/definitions/account-identifier" }, "lastUpdatedBy": { "description": "The account identifier of the user who last updated this resource instance", "$ref": "common-db#/definitions/account-identifier" }, "lastAction": { "description": "The last action that was run on this instance", "type": "object", "additionalProperties": false, "required": [ "_id", "executionId", "name", "type", "status" ], "properties": { "_id": { "$ref": "resource-model-common#/definitions/action-identifier" }, "executionId": { "$ref": "common-db#/definitions/document-identifier" }, "name": { "$ref": "resource-model-common#/definitions/action/properties/name" }, "type": { "$ref": "resource-model-common#/definitions/action/properties/type" }, "status": { "$ref": "resource-action-execution-common#/definitions/status" } } } } }