{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-approval-pkg-approval-template-schema.json",
  "title": "FinanceKey.Entity.ApprovalPkg.ApprovalTemplate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-approvals-api-openapi.yml#/components/schemas/FinanceKey.Entity.ApprovalPkg.ApprovalTemplate",
  "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
    },
    "approvalTemplateId": {
      "type": "integer",
      "description": "The ApprovalTemplateId is a unique identity field in the table called ApprovalTemplate, and it is of the data type int. This field serves as the primary key for the table, and it is automatically assigned a sequential number by the database system when a new ApprovalTemplate is inserted into the table. This number is used to identify and uniquely distinguish each ApprovalTemplate in the table. The ApprovalTemplateId field plays a crucial role in maintaining the integrity and coherence of the data in the ApprovalTemplate table, as it ensures that each record is uniquely identified and can be easily retrieved for further processing. This field is essential for tracking and organizing approval templates, making it a vital component of the ApprovalTemplate table. It is also utilized as a reference in other related tables and databases, facilitating efficient data management and accurate tracking of approval processes.",
      "format": "int32"
    },
    "description": {
      "maxLength": 256,
      "type": [
        "string",
        "null"
      ],
      "description": "The 'Description' field in the 'ApprovalTemplate' table is a data type of nvarchar with a maximum length of 256 characters. This field is used to provide a brief explanation or summary of the approval template, allowing for easy identification and understanding of its purpose. It can contain a variety of information such as the name, purpose, or requirements of the approval template. This field can be edited and updated as needed to accurately reflect the details of the template."
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Miscellaneous notes and information for the entry or record."
    },
    "entityId": {
      "maxLength": 450,
      "type": [
        "string",
        "null"
      ],
      "description": "The EntityId field in the ApprovalTemplate table is a nvarchar data type with a maximum length of 450 characters. This field is used to identify the entity associated with the approval template, such as a department, project, or organization. The EntityId field allows for easy organization and categorization of approval templates, making it easier to manage and track different approval processes within the database. It also provides a unique identifier for each approval template, enabling efficient retrieval and updating of specific templates. This field is essential for maintaining a well-organized and efficient approval process within the database."
    },
    "approvalFlowId": {
      "maxLength": 32,
      "type": [
        "string",
        "null"
      ],
      "description": "The ApprovalFlowId field in the ApprovalTemplate table is a nvarchar data type with a maximum length of 32 characters. This field is used to store a unique identifier for each approval flow within the template, allowing for easy tracking and management. It serves as a key field in the table, linking each approval flow to its corresponding template. With its flexible data type and length, the ApprovalFlowId field can accommodate various formats and provide a seamless experience for users interacting with the ApprovalTemplate table."
    }
  },
  "additionalProperties": false
}