{
  "$defs": {
    "AntiDilution": {
      "description": "Anti-dilution provision.",
      "enum": [
        "broad-based-weighted-average",
        "narrow-based-weighted-average",
        "full-ratchet",
        "none"
      ],
      "type": "string"
    },
    "DilutionModel": {
      "description": "Dilution model for a stock class.",
      "properties": {
        "conversion": {
          "type": [
            "string",
            "null"
          ]
        },
        "dilution_timing": {
          "type": [
            "string",
            "null"
          ]
        },
        "pre_seed_instrument": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "FormationHolder": {
      "description": "Holder at formation of a stock class.",
      "properties": {
        "percentage": {
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "shareholder": {
          "type": [
            "string",
            "null"
          ]
        },
        "shares": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "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"
    },
    "StatusActive": {
      "description": "Lifecycle status for entities.",
      "enum": [
        "active",
        "inactive",
        "dissolved",
        "pre-incorporation",
        "planned"
      ],
      "type": "string"
    },
    "StockClassCustom": {
      "description": "Typed extension fields for StockClass.",
      "properties": {
        "dilution_model": {
          "anyOf": [
            {
              "$ref": "#/$defs/DilutionModel"
            },
            {
              "type": "null"
            }
          ]
        },
        "entity": {
          "type": [
            "string",
            "null"
          ]
        },
        "holders_at_formation": {
          "items": {
            "$ref": "#/$defs/FormationHolder"
          },
          "type": "array"
        },
        "jurisdiction": {
          "type": [
            "string",
            "null"
          ]
        },
        "option_pool_strategy": {
          "type": [
            "string",
            "null"
          ]
        },
        "paid_in_before_filing_eur": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "stammkapital_eur": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "StockType": {
      "description": "Stock class type.",
      "enum": [
        "common",
        "preferred"
      ],
      "type": "string"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.7.1/stock-class.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Stock class definition aligned with Open Cap Format (OCF) stock class object.",
  "properties": {
    "anti_dilution": {
      "anyOf": [
        {
          "$ref": "#/$defs/AntiDilution"
        },
        {
          "type": "null"
        }
      ]
    },
    "authorized_shares": {
      "format": "int64",
      "minimum": 0,
      "type": "integer"
    },
    "board_approval_date": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ]
    },
    "conversion_ratio": {
      "format": "double",
      "minimum": 0.0,
      "type": [
        "number",
        "null"
      ]
    },
    "custom": {
      "anyOf": [
        {
          "$ref": "#/$defs/StockClassCustom"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "liquidation_preference": {
      "format": "double",
      "minimum": 0.0,
      "type": [
        "number",
        "null"
      ]
    },
    "name": {
      "type": "string"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "par_value": {
      "anyOf": [
        {
          "$ref": "#/$defs/MonetaryAmount"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "$ref": "#/$defs/StatusActive"
    },
    "type": {
      "$ref": "#/$defs/StockType"
    },
    "votes_per_share": {
      "format": "double",
      "minimum": 0.0,
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "type",
    "authorized_shares",
    "status"
  ],
  "title": "StockClass",
  "type": "object"
}