{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-credit-rating-pkg-v-rating-schema.json",
  "title": "FinanceKey.Entity.CreditRatingPkg.v_Rating",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-credit-ratings-api-openapi.yml#/components/schemas/FinanceKey.Entity.CreditRatingPkg.v_Rating",
  "required": [
    "description",
    "longTerm",
    "ratingAgencyId",
    "shortTerm"
  ],
  "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
    },
    "ratingId": {
      "type": "integer",
      "description": "RatingId is the unique identifying number for records within the Rating table, and is of data type int. RatingId serves as the primary key for the table, and each RatingId record is unique and cannot be duplicated.",
      "format": "int32"
    },
    "ratingAgencyId": {
      "maxLength": 32,
      "minLength": 1,
      "type": "string",
      "description": "RatingAgencyId is an nvarchar field in the Rating table with a maximum length of 32 characters. This field stores identification numbers for rating agencies assigned to ratings in the table. Ratings are used to give an overall score to certain entities such as companies, products, movies, etc."
    },
    "description": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "This field, called Description, is an nvarchar field that can store up to 256 characters of text in a table called Rating. This field is used to store a brief description of the rating that has been given."
    },
    "longTerm": {
      "maxLength": 16,
      "minLength": 1,
      "type": "string",
      "description": "The LongTerm field in the Rating table is a nvarchar data type field with a maximum length of 16 characters. It stores information related to the long-term trend of the rating under consideration."
    },
    "shortTerm": {
      "maxLength": 16,
      "minLength": 1,
      "type": "string",
      "description": "The ShortTerm field of type nvarchar (maximum length of 16) in the Rating table is used to store short-term ratings given by customers or employees. These ratings will provide insight into overall customer satisfaction or employee performance."
    },
    "sequence": {
      "type": "integer",
      "description": "The Sequence field in the Rating table is an integer data type that is used to store the order of ratings from the most recent to the oldest. This allows for data to be pulled from the database in sequential order.",
      "format": "int32"
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Miscellaneous notes and information for the entry or record."
    }
  },
  "additionalProperties": false
}