{
  "$defs": {
    "ClassSnapshot": {
      "description": "Snapshot of one stock class at the snapshot date.",
      "properties": {
        "authorized": {
          "format": "int64",
          "type": "integer"
        },
        "issued_basic": {
          "format": "int64",
          "type": "integer"
        },
        "issued_fd": {
          "format": "double",
          "type": "number"
        },
        "percent_basic": {
          "format": "double",
          "type": "number"
        },
        "percent_fd": {
          "format": "double",
          "type": "number"
        },
        "stock_class": {
          "$ref": "#/$defs/PathRef"
        }
      },
      "required": [
        "stock_class",
        "authorized",
        "issued_basic",
        "issued_fd",
        "percent_basic",
        "percent_fd"
      ],
      "type": "object"
    },
    "ConvertibleSnapshot": {
      "description": "Outstanding convertible (SAFE / Note / Wandeldarlehen) at the\nsnapshot date with projected conversion mechanics.",
      "properties": {
        "accrued_interest": {
          "$ref": "#/$defs/MonetaryAmount"
        },
        "instrument": {
          "$ref": "#/$defs/PathRef"
        },
        "principal_outstanding": {
          "$ref": "#/$defs/MonetaryAmount"
        },
        "projected_shares_on_conversion": {
          "description": "Number of shares projected to be issued on conversion at a\nreference next-round valuation. Decimal allowed for fractional\nshare calculations.",
          "format": "double",
          "type": "number"
        }
      },
      "required": [
        "instrument",
        "principal_outstanding",
        "accrued_interest",
        "projected_shares_on_conversion"
      ],
      "type": "object"
    },
    "IsoCurrency": {
      "description": "ISO 4217 currency code.",
      "pattern": "^[A-Z]{3}$",
      "type": "string"
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "MonetaryAmount": {
      "description": "A monetary value with currency.",
      "properties": {
        "amount": {
          "format": "double",
          "type": "number"
        },
        "currency": {
          "$ref": "#/$defs/IsoCurrency"
        }
      },
      "required": [
        "amount",
        "currency"
      ],
      "type": "object"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "StakeholderPosition": {
      "description": "Per-stakeholder position at the snapshot date.",
      "properties": {
        "pct_basic": {
          "format": "double",
          "type": "number"
        },
        "pct_fd": {
          "format": "double",
          "type": "number"
        },
        "shares_basic": {
          "format": "int64",
          "type": "integer"
        },
        "shares_fd": {
          "format": "double",
          "type": "number"
        },
        "stakeholder": {
          "$ref": "#/$defs/PathRef"
        },
        "stock_class": {
          "$ref": "#/$defs/PathRef"
        }
      },
      "required": [
        "stakeholder",
        "stock_class",
        "shares_basic",
        "shares_fd",
        "pct_basic",
        "pct_fd"
      ],
      "type": "object"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/cap-table.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Cap-table snapshot record per BDR 0067 §6.",
  "properties": {
    "as_of": {
      "$ref": "#/$defs/IsoDate"
    },
    "classes": {
      "items": {
        "$ref": "#/$defs/ClassSnapshot"
      },
      "type": "array"
    },
    "content_hash": {
      "type": "string"
    },
    "convertibles_outstanding": {
      "items": {
        "$ref": "#/$defs/ConvertibleSnapshot"
      },
      "type": "array"
    },
    "entity": {
      "$ref": "#/$defs/PathRef"
    },
    "generated_at": {
      "$ref": "#/$defs/IsoDate"
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "option_pool_unallocated_pct": {
      "format": "double",
      "type": "number"
    },
    "option_pool_unallocated_shares": {
      "format": "int64",
      "type": "integer"
    },
    "stakeholder_positions": {
      "items": {
        "$ref": "#/$defs/StakeholderPosition"
      },
      "type": "array"
    },
    "total_basic": {
      "format": "int64",
      "type": "integer"
    },
    "total_fd": {
      "format": "double",
      "type": "number"
    },
    "triggering_event": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "EquityTransaction PathRef whose posting triggered the snapshot."
    }
  },
  "required": [
    "id",
    "entity",
    "as_of",
    "classes",
    "total_basic",
    "total_fd",
    "option_pool_unallocated_pct",
    "option_pool_unallocated_shares",
    "stakeholder_positions",
    "content_hash",
    "generated_at"
  ],
  "title": "CapTableSnapshot",
  "type": "object",
  "x-corpospec-pillar": "entity"
}