{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-core-pkg-v-client-environment-schema.json",
  "title": "FinanceKey.Entity.CorePkg.v_ClientEnvironment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-cores-api-openapi.yml#/components/schemas/FinanceKey.Entity.CorePkg.v_ClientEnvironment",
  "required": [
    "adClientCredentialName",
    "environmentId"
  ],
  "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
    },
    "clientEnvironmentId": {
      "type": "integer",
      "description": "The ClientEnvironmentId is an integer data type field found in the ClientEnvironment table. It stores a unique numerical identifier for each particular client environment record within the table.",
      "format": "int32"
    },
    "clientId": {
      "type": "integer",
      "description": "ClientId is an integer field in the ClientEnvironment table that stores a unique identifier for each client associated with a particular environment. Its value is automatically generated based on the client's information.",
      "format": "int32"
    },
    "environmentId": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "EnvironmentId is a nvarchar field in the ClientEnvironment table that is used to uniquely identify an environment associated with a particular client. It has a maximum length of 256 characters."
    },
    "resourceGroupId": {
      "type": "integer",
      "description": "ResourceGroupId is an int field in a table called ClientEnvironment which is used to identify the resource group that a particular client environment is associated with. ResourceGroupId is used to join with other tables to retrieve additional resource group related information.",
      "format": "int32"
    },
    "dataBaseId": {
      "type": "integer",
      "description": "DataBaseId is an integer field in a ClientEnvironment table. This field is used to store the unique identity of each client environment in the database.",
      "format": "int32"
    },
    "appServicePlanId": {
      "type": "integer",
      "description": "The AppServicePlanId field of type int in the ClientEnvironment table stores the ID of the App Service Plan that the environment runs on.",
      "format": "int32"
    },
    "webAppId": {
      "type": "integer",
      "description": "WebAppId is an int field in the ClientEnvironment table used as a unique key to identify the client's web application, usually allocated when the web application is installed.",
      "format": "int32"
    },
    "webJobId": {
      "type": "integer",
      "description": "The WebJobId field in the ClientEnvironment table is an integer which holds an automatically generated unique identifier for a particular web job that is being tracked by the database.",
      "format": "int32"
    },
    "storageAccountId": {
      "type": "integer",
      "description": "StorageAccountId: This field contains the unique id number for a client's external storage account. It is an integer value used as an identifier in the ClientEnvironment table.",
      "format": "int32"
    },
    "subdomainId": {
      "type": "integer",
      "description": "A SubdomainId is an int data type field in the ClientEnvironment table used to store the unique identifier for each individual subdomain that belongs to a particular client environment. It is necessary to uniquely identify the subdomain for each client.",
      "format": "int32"
    },
    "clientName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ClientName field of data type nvarchar in the ClientEnvironment table stores the name of a particular client's environment. This field can hold up to 255 characters of text data which typically includes a combination of alphanumeric characters and spaces."
    },
    "adClientCredentialId": {
      "type": "integer",
      "description": "AdClientCredentialId in the ClientEnvironment table is a field of data type int that stores a unique identifier for the credentials associated with the advertisement client.",
      "format": "int32"
    },
    "adTenantId": {
      "type": [
        "string",
        "null"
      ],
      "description": "AdTenantId is a field in the ClientEnvironment table that stores the Azure TenantId which is used when communicating from app to the client environment."
    },
    "appServicePlanName": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "AppServicePlanName is a nvarchar field in the ClientEnvironment table with a maximum length of 64. It stores the name of an App Service Plan associated with the environment, which defines the pricing tier of the App Service resources as part of the hosting environment."
    },
    "adClientCredentialName": {
      "minLength": 1,
      "type": "string",
      "description": "AdClientCredentialName is a field within the ClientEnvironment table that stores a specific type of data known as nvarchar. This field is used to store the name of a client's advertising credentials, which are used to access and manage their advertising campaigns. The information stored in this field is essential for managing the advertising activities of clients and ensuring the proper implementation of their advertising strategies. By storing this data in a designated field, it can be easily retrieved and managed within the larger ClientEnvironment table. This field plays a crucial role in maintaining accurate and up-to-date records of client information in the database, making it a vital component of the overall data management system."
    },
    "dataBaseName": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "DataBaseName is an nvarchar field in the ClientEnvironment table with a maximum length of 64 characters. It stores the name of the database relevant to the client environment."
    },
    "resourceGroupName": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "ResourceGroupName is an nvarchar data type field with a maximum length of 64 characters stored in the ClientEnvironment table. This field holds the name of the resource group in an Azure cloud environment associated with a particular client."
    },
    "storageAccountName": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "StorageAccountName in the ClientEnvironment table is a nvarchar data type of maximum length 64 which is used to store the Azure Storage Account Name associated with a particular client."
    },
    "webAppName": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "WebAppName is a nvarchar data type field located within the ClientEnvironment table and will store the name of the web application of up to 64 characters."
    },
    "webJobName": {
      "maxLength": 64,
      "type": [
        "string",
        "null"
      ],
      "description": "WebJobName is an nvarchar field with a maximum length of 64 characters in the ClientEnvironment table. It stores the name of any WebJobs associated with the environment."
    },
    "subdomainValue": {
      "maxLength": 256,
      "type": [
        "string",
        "null"
      ],
      "description": "The SubdomainValue field of the ClientEnvironment table stores a distinct subdomain of a website as a Non-Unicode string (NVARCHAR) of a maximum length of 256 characters."
    }
  },
  "additionalProperties": false
}