{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/pandium/blob/main/json-schema/tenant.json",
  "title": "Pandium Tenant",
  "description": "A Tenant represents a customer instance of an integration on the Pandium platform, with its own configuration, schedule, and connection credentials.",
  "type": "object",
  "required": ["id", "name", "integration_id"],
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique identifier for the tenant."
    },
    "name": {
      "type": "string",
      "description": "Name of the tenant."
    },
    "archived": {
      "type": "boolean",
      "description": "Whether the tenant is archived."
    },
    "integration_id": {
      "type": "integer",
      "description": "ID of the associated integration."
    },
    "configs": {
      "type": "object",
      "description": "Configuration settings for the tenant.",
      "additionalProperties": true
    },
    "created_date": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time the tenant was created."
    },
    "modified_date": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time the tenant was last modified."
    },
    "paused": {
      "type": "boolean",
      "description": "Whether the tenant is paused."
    },
    "user_schedule": {
      "type": "string",
      "description": "The user-defined cron schedule for the tenant."
    },
    "schedule": {
      "type": "string",
      "description": "The effective schedule for the tenant."
    },
    "source": {
      "type": "string",
      "description": "The source of the tenant creation."
    },
    "integration_release_id": {
      "type": "integer",
      "description": "ID of the integration release assigned to this tenant."
    },
    "integration_release_channel": {
      "type": "string",
      "description": "The release channel for the tenant."
    },
    "status": {
      "type": "string",
      "description": "Current status of the tenant."
    }
  }
}
