{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-audit-pkg-v-activity-log-schema.json",
  "title": "FinanceKey.Entity.AuditPkg.v_ActivityLog",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-audits-api-openapi.yml#/components/schemas/FinanceKey.Entity.AuditPkg.v_ActivityLog",
  "required": [
    "entityId"
  ],
  "type": "object",
  "properties": {
    "createdById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that created the initial record.",
      "format": "int32",
      "readOnly": true
    },
    "createdOn": {
      "type": "string",
      "description": "The date and time the record was initially created.",
      "format": "date-time",
      "readOnly": true
    },
    "updatedById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that last modified the record.",
      "format": "int32",
      "readOnly": true
    },
    "updateOn": {
      "type": "string",
      "description": "The date and time the record was last modified.",
      "format": "date-time",
      "readOnly": true
    },
    "closedById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that deactivated and closed the record.",
      "format": "int32",
      "readOnly": true
    },
    "closedOn": {
      "type": "string",
      "description": "The date and time the record is to be considered as inactive and closed.",
      "format": "date-time",
      "readOnly": true
    },
    "active": {
      "type": "boolean",
      "description": "A flag that shows if the record is currently active. This values is calculated based on the current date and the record closed date.",
      "readOnly": true
    },
    "rowVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "A unique version stamp of the record.",
      "format": "byte",
      "readOnly": true
    },
    "sessionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The identity of the session that last modified the record.",
      "readOnly": true
    },
    "activityLogId": {
      "type": "integer",
      "description": "**ActivityLogId**: An integer field that serves as the unique identifier for each entry in the ActivityLog table. This field is automatically generated and incremented for every new record, ensuring that each activity log entry can be distinctly referenced and tracked throughout the database.",
      "format": "int32"
    },
    "entityId": {
      "maxLength": 450,
      "minLength": 1,
      "type": "string",
      "description": "The `EntityId` field in the `ActivityLog` table is an nvarchar data type designed to store unique identifiers for entities related to specific activities. It has a maximum length of 450 characters, allowing for the flexibility to accommodate diverse identifier formats while ensuring compatibility with various entity types across the application. This field serves as a crucial reference point, linking log entries to corresponding entities in the system."
    },
    "itemId": {
      "maxLength": 450,
      "type": [
        "string",
        "null"
      ],
      "description": "**ItemId**: A unique identifier for each item associated with the activity logged in the ActivityLog table. This field is of data type `nvarchar`, allowing for a variable-length string that can accommodate alphanumeric characters and special symbols, ensuring flexibility in the representation of item identifiers across diverse systems."
    },
    "intItemId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "IntItemId: An integer identifier that uniquely represents a specific item associated with the activity logged in the ActivityLog table.",
      "format": "int32"
    },
    "activityId": {
      "maxLength": 32,
      "type": [
        "string",
        "null"
      ],
      "description": "**ActivityId**: A unique identifier for each activity logged in the ActivityLog table. This field uses the nvarchar data type with a maximum length of 32 characters, allowing for flexible storage of alphanumeric identifiers, including international characters. It serves as a key reference for tracking and correlating specific activities within the dataset."
    },
    "systemMessage": {
      "type": [
        "string",
        "null"
      ],
      "description": "The **SystemMessage** field in the **ActivityLog** table is designed to store textual messages generated by the system, providing detailed information about events, actions, or errors that occur during operation. This field utilizes the nvarchar data type, allowing it to accommodate variable-length Unicode strings, which supports multiple languages and special characters. The SystemMessage field is essential for tracking system behavior, debugging issues, and maintaining a comprehensive audit trail of activities."
    },
    "firstNameLastName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The system account that performed the actitity."
    },
    "photoUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "This field, PhotoUrl, is designed to store the URL link to an image associated with an activity logged in the ActivityLog table. It is of data type nvarchar, allowing for the storage of Unicode character data, which ensures compatibility with various character sets and enables the representation of international characters. The URL should point to a publicly accessible image, facilitating easy retrieval and display of photos related to the logged activities. The maximum length of the URL should adhere to standard URL length limitations to ensure proper functionality."
    }
  },
  "additionalProperties": false
}