{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-credit-facility-pkg-credit-facility-usage-schema.json",
  "title": "FinanceKey.Entity.CreditFacilityPkg.CreditFacilityUsage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-credit-facilities-api-openapi.yml#/components/schemas/FinanceKey.Entity.CreditFacilityPkg.CreditFacilityUsage",
  "required": [
    "date",
    "facilityAmount",
    "facilityCurrencyId",
    "reportingFacilityAmount",
    "reportingFacilityOpeningUsageAmount",
    "reportingFacilityUsageAmount"
  ],
  "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
    },
    "creditFacilityUsageId": {
      "type": "integer",
      "description": "The CreditFacilityUsageId field is an integer data type field in the CreditFacilityUsage table. This field contains unique identifiers for each row in the table and is used as a primary key by the database to ensure that there is only one entry for each CreditFacilityUsage record. This field is automatically populated in order to uniquely identify the entries in the table.",
      "format": "int32",
      "readOnly": true
    },
    "creditFacilityId": {
      "type": "integer",
      "description": "The credit facility for which usage record has been generated.",
      "format": "int32",
      "readOnly": true
    },
    "facilityAmount": {
      "type": "number",
      "description": "The amount of the facility at the time of the usage.",
      "format": "double",
      "readOnly": true
    },
    "facilityCurrencyId": {
      "minLength": 1,
      "type": "string",
      "description": "The currency of the facility when the usage record was created.",
      "readOnly": true
    },
    "date": {
      "type": "string",
      "description": "The date stamp of the usage",
      "format": "date-time",
      "readOnly": true
    },
    "reportingFacilityAmount": {
      "type": "number",
      "description": "The amount of the credit facility in the company reporting currency.",
      "format": "double",
      "readOnly": true
    },
    "reportingFacilityUsageAmount": {
      "type": "number",
      "description": "The amount of the facility used in the company reporting currency.",
      "format": "double",
      "readOnly": true
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Miscellaneous notes and information for the entry or record."
    },
    "accountBalanceId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "reportingFacilityOpeningUsageAmount": {
      "type": "number",
      "description": "The ReportingFacilityOpeningUsageAmount field in the CreditFacilityUsage table contains the opening usage amount of a particular reporting facility, expressed in terms of a decimal value.",
      "format": "double"
    }
  },
  "additionalProperties": false
}