{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/treasure-data/main/json-schema/database.json",
  "title": "Database",
  "description": "A logical container in Treasure Data that holds tables of data.",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Unique name of the database within the account"
    },
    "count": {
      "type": "integer",
      "description": "Number of tables in this database",
      "minimum": 0
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the database was created"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the database was last updated"
    },
    "permission": {
      "type": "string",
      "description": "Permission level of the authenticated user on this database",
      "enum": ["administrator", "full_access", "import_only", "query_only"]
    }
  },
  "required": ["name"]
}
