{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Volya Ledger Entry",
  "type": "object",
  "description": "Example schema only. Real financial data must not be fabricated.",
  "required": [
    "id",
    "entry_type",
    "source",
    "currency",
    "status",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "entry_type": {
      "enum": [
        "revenue",
        "expense",
        "allocation",
        "transfer",
        "outcome"
      ]
    },
    "source": {
      "type": "string"
    },
    "campaign": {
      "type": [
        "string",
        "null"
      ]
    },
    "product": {
      "type": [
        "string",
        "null"
      ]
    },
    "gross_amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "fees_amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "direct_cost_amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "net_amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "allocation_lane": {
      "type": [
        "string",
        "null"
      ]
    },
    "allocated_amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "recipient_or_project": {
      "type": [
        "string",
        "null"
      ]
    },
    "operating_entity": {
      "type": [
        "string",
        "null"
      ]
    },
    "currency": {
      "type": "string"
    },
    "status": {
      "enum": [
        "pledged",
        "committed",
        "transferred",
        "delivered",
        "verified"
      ]
    },
    "transfer_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "evidence_urls": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "outcome_urls": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "redacted": {
      "type": "boolean"
    },
    "redaction_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    }
  }
}