{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-calendar-pkg-v-calendar-schema.json",
  "title": "FinanceKey.Entity.CalendarPkg.v_Calendar",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-calendars-api-openapi.yml#/components/schemas/FinanceKey.Entity.CalendarPkg.v_Calendar",
  "required": [
    "calendarId"
  ],
  "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
    },
    "calendarId": {
      "type": "string",
      "description": "The CalendarId field in the Calendar table represents a unique identifier for each record in the table. It is of type datetime2, meaning it stores a date and time value that is accurate up to the nanosecond. This field serves as the primary key for the table and is used to uniquely identify and distinguish one calendar event from another. With this primary key, it is easy to keep track of important dates and times for scheduling and planning purposes. Additionally, the datetime2 data type allows for precise and efficient sorting and filtering of records in the database.",
      "format": "date-time"
    },
    "year": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The 'Year' field in the 'Calendar' table is of data type int and stores the numerical representation of the year for a particular date. This field allows for sorting and organizing data based on the year component of a date. It can be used to track historical data, plan future events, and analyze trends over time. This field is essential for organizing and managing information related to dates in the database.",
      "format": "int32"
    },
    "month": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The column 'Month' in the 'Calendar' table is an integer data type that stores the numerical representation of a month in the year. This field is used to organize and sort data based on the month in which an event or activity takes place. It allows for easier analysis and tracking of data on a monthly basis. The values for this field range from 1 to 12, representing each of the 12 months in a calendar year. The 'Month' field can be used in conjunction with other date-related fields, such as 'Day' and 'Year,' to display and manipulate specific dates within the calendar.",
      "format": "int32"
    },
    "day": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The field 'Day' in the 'Calendar' table is an integer data type that stores the numerical representation of a specific day within a date or time period. This field is often used in conjunction with other fields, such as 'Month' and 'Year', to create a complete date value. It can be used to track events, schedule appointments, or organize tasks according to the specific day of the week. The range of values in this field typically corresponds with the actual number of days in a month, ranging from 1 to 31. In some cases, it may also be used to indicate the day of the week, with 1 representing Sunday and 7 representing Saturday. The 'Day' field provides an efficient and practical way to categorize and manage time-related data in the 'Calendar' table.",
      "format": "int32"
    },
    "dayOfYear": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The field DayOfYear in the Calendar table represents the numerical value indicating the day of the year for a specific date. This data type is integer and ranges from 1 to 365 (or 366 in leap years). It allows for easy organization and sorting by date in a calendar format. This field is useful for tracking events, scheduling tasks, or creating reports based on a specific day of the year.",
      "format": "int32"
    },
    "yearQuarter": {
      "maxLength": 6,
      "type": [
        "string",
        "null"
      ],
      "description": "The YearQuarter field in the Calendar table is a nvarchar data type with a maximum length of 6 characters. This field represents the specific quarter of a year, combining the year and quarter information into one value. It allows for easier organization and analysis of data by quarter, helping to track and compare progress over time. The maximum length of 6 characters allows room for both the year and quarter, making it a concise but informative data point."
    },
    "quarter": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The Quarter field in the Calendar table is an integer that represents the quarter of the year for a specific date. It can range from 1 to 4, with each number corresponding to a specific quarter (e.g. 1 for January to March, 2 for April to June, etc.). This field can be used to organize and analyze data related to quarterly events, sales, or other time-sensitive information.",
      "format": "int32"
    },
    "yearMonth": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The YearMonth field in the Calendar table is an integer data type that represents the month and year in a particular format. This field can be used to store the specific month and year for a particular date in a calendar. The values for this field will range from 1 to 12 for the months and from a specific starting year to a predefined ending year. This field is useful for organizing and categorizing data based on specific time periods, such as monthly reports or event dates. It allows for easy sorting and filtering of data based on month and year, providing a convenient way to analyze and track information over time.",
      "format": "int32"
    },
    "yearDay": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The YearDay field in the Calendar table stores the numerical representation of the day within a year. This data type is set to int, meaning it can hold whole numbers between -2,147,483,648 and 2,147,483,647. This field is commonly used to track the progression of days throughout the year, providing a convenient reference for scheduling and planning purposes. With the YearDay field, it is easy to calculate the number of days that have passed in a year, or the number of days remaining. This data can be useful for a variety of applications, including event planning and budgeting.",
      "format": "int32"
    },
    "yearWeek": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The YearWeek field is a data type of int in the Calendar table, which stores information about specific weeks within a year. This field is commonly used in financial and business data to track and analyze weekly trends and performance. It typically consists of a four-digit year value followed by a two-digit week number, allowing for easy sorting and organization of data. The YearWeek field is an essential component in creating comprehensive and accurate reports and forecasts based on weekly data.",
      "format": "int32"
    }
  },
  "additionalProperties": false
}