{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AuditRecord",
  "title": "AuditRecord",
  "type": "object",
  "description": "A single Control Room audit trail event record",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "Unique identifier of the audit record"
    },
    "activityType": {
      "type": "string",
      "description": "Category of the audit activity (e.g., USER_LOGIN, BOT_DEPLOY)"
    },
    "createdBy": {
      "type": "string",
      "description": "Username of the user who triggered the audited event"
    },
    "createdOn": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp of the audited event"
    },
    "detail": {
      "type": "string",
      "description": "Detailed description of the audited action"
    },
    "environmentName": {
      "type": "string",
      "description": "Name of the Control Room environment"
    },
    "eventDescription": {
      "type": "string",
      "description": "Human-readable description of the event"
    },
    "hostName": {
      "type": "string",
      "description": "Hostname of the system where the event occurred"
    },
    "objectName": {
      "type": "string",
      "description": "Name of the resource object affected by the event"
    },
    "requestId": {
      "type": "string",
      "description": "Unique request identifier for tracing"
    },
    "source": {
      "type": "string",
      "description": "Source system or interface that triggered the event"
    },
    "status": {
      "type": "string",
      "description": "Outcome status of the audited action"
    },
    "userName": {
      "type": "string",
      "description": "Username associated with the event"
    }
  }
}