{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/PremiumLineItem",
  "definitions": {
    "PremiumLineItem": {
      "type": "object",
      "properties": {
        "lineOfBusiness": {
          "$ref": "#/definitions/CodeableConcept",
          "description": "Line of business this premium applies to."
        },
        "premium": {
          "$ref": "#/definitions/Money",
          "description": "Premium amount for this line"
        },
        "rateBasis": {
          "type": "string",
          "description": "Rate basis description (e.g. \"per $1,000 of payroll\")"
        },
        "rate": {
          "type": "number",
          "description": "The rate applied"
        },
        "exposureBase": {
          "type": "number",
          "description": "Exposure base value (e.g. total payroll, total sales)"
        }
      },
      "required": [
        "lineOfBusiness",
        "premium"
      ],
      "additionalProperties": false,
      "description": "A premium line item breaking down the cost by coverage line."
    },
    "CodeableConcept": {
      "type": "object",
      "properties": {
        "coding": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coding"
          },
          "description": "Code(s) from formal code systems"
        },
        "text": {
          "type": "string",
          "description": "Plain text representation of the concept"
        }
      },
      "additionalProperties": false,
      "description": "A concept with a coding and optional text. Wraps one or more Coding values with a human-readable summary."
    },
    "Coding": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string",
          "description": "The code system URI that defines the code.",
          "format": "uri"
        },
        "code": {
          "type": "string",
          "description": "The code value from the code system"
        },
        "display": {
          "type": "string",
          "description": "Human-readable display text for the code"
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": false,
      "description": "A coded value from a defined code system. Used throughout BIND for standardized enumerations.",
      "examples": [
        {
          "system": "https://bind.codes/line-of-business",
          "code": "GL",
          "display": "General Liability"
        }
      ]
    },
    "Money": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Numeric amount. Represented as a number; precision should be maintained by the consuming system."
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 currency code.",
          "default": "USD"
        }
      },
      "required": [
        "value"
      ],
      "additionalProperties": false,
      "description": "A monetary amount with currency.",
      "examples": [
        {
          "value": 1000000,
          "currency": "USD"
        }
      ]
    }
  },
  "$id": "https://bind-standard.org/schema/PremiumLineItem",
  "title": "PremiumLineItem"
}
