{
  "$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-event-schema.json",
  "title": "FinanceKey.Entity.CalendarPkg.v_CalendarEvent",
  "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_CalendarEvent",
  "required": [
    "calendarId",
    "end",
    "start",
    "title"
  ],
  "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
    },
    "calendarEventId": {
      "type": "integer",
      "description": "The CalendarEventId is an identity field in the CalendarEvent table, with a data type of int. This field serves as a unique identifier for each event within the calendar. As an identity field, it automatically assigns a value to each new event added to the table, ensuring that no two events have the same CalendarEventId. This makes it easier for users to search for and update specific events without confusion. The CalendarEventId also serves as a primary key for the table, allowing for efficient indexing and retrieval of information. Additionally, the data type of int allows for a wide range of integer values to be stored in this field, accommodating the potential for a large number of events in the calendar.",
      "format": "int32"
    },
    "calendarId": {
      "type": "string",
      "description": "The CalendarId field in the CalendarEvent table is a data type of datetime2, used to store the specific date and time of an event in a calendar. This field serves as a unique identifier for each calendar event, allowing for efficient organization and retrieval of events within the database. The datetime2 data type ensures precise and accurate storage of time and date values, making it ideal for managing schedules and agendas. The CalendarId field is an essential component in the CalendarEvent table, providing the necessary information for tracking, planning, and managing events.",
      "format": "date-time"
    },
    "eventId": {
      "type": "integer",
      "description": "The EventId field in the CalendarEvent table is a data type integer that serves as a unique identifier for each event listed in the calendar. This field is crucial for accurately identifying and organizing events within the table, as well as for ensuring their proper placement in the calendar. The EventId is automatically assigned to each event upon creation and can be utilized for various purposes, such as filtering or sorting events, as well as tracking attendance or generating reports. With the EventId, users can easily access and manage specific events within the table, making the overall calendar organization more efficient and streamlined.",
      "format": "int32"
    },
    "title": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "Title is a field in the CalendarEvent table that stores a string of characters in the nvarchar data type with a maximum length of 256. This field is used to provide a brief and concise description of the event associated with the particular record in the table. The title is used to easily identify and distinguish between different events within the calendar system. The nvarchar data type allows for a wide range of characters to be stored, including special characters and symbols. This makes it suitable for storing event titles in various languages and formats. Additionally, the maximum length of 256 ensures that the title remains short and specific, making it easier to read and understand."
    },
    "itemId": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "The ItemId field in the CalendarEvent table is of data type nvarchar and has a maximum length of 64 characters. This field is used to uniquely identify each event in the calendar, allowing for easy tracking and organization of events. The nvarchar data type allows for a mixture of alphanumeric characters, making it versatile for storing various types of event identifiers. With a maximum length of 64, this field can accommodate longer event identifiers without taking up excessive storage space. Overall, the ItemId field plays a crucial role in the functionality and efficiency of the CalendarEvent table."
    },
    "eventTypeId": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "The EventTypeId field in the CalendarEvent table is a nvarchar data type with a maximum length of 64 characters. This field stores a unique identifier for each type of event in the calendar, allowing for easy categorization and organization of events. This field can hold alphanumeric characters and is useful for sorting and filtering events based on their type. The maximum length of 64 characters ensures that event types are named concisely but still offer enough description for clear identification. Overall, the EventTypeId field plays a crucial role in efficiently managing and navigating the calendar events."
    },
    "start": {
      "type": "string",
      "description": "The Start field in the CalendarEvent table is a data type that stores the specific time at which an event will begin. This information is crucial for effectively organizing and scheduling events in a calendar. The Start field is typically used in conjunction with the End field to create a time range for the event. It is an essential component of the CalendarEvent table, as it allows for precise time-based planning and tracking of events. This field is especially helpful for managing events with multiple start times or recurring events. With the Start field, users can easily view and manage their events in a timely manner, making it an indispensable tool for efficient event management.",
      "format": "date-span"
    },
    "end": {
      "type": "string",
      "description": "The 'End of data type time' field in the 'CalendarEvent' table is designated for storing the specific time at which a particular event or appointment ends. This data type serves as a critical reference point for organizing and scheduling tasks, meetings, and events. Information entered into this field allows individuals to maintain a clear and accurate understanding of their daily and long-term schedules. By providing a definitive end time, this data type enables efficient time management and ensures that all planned activities can be successfully completed within the allotted time frame.",
      "format": "date-span"
    }
  },
  "additionalProperties": false
}