{
  "$defs": {
    "AssetCategory": {
      "description": "Top-level asset category. Drives default useful-life expectations and\nstatutory disclosures.",
      "oneOf": [
        {
          "enum": [
            "machinery",
            "it_hardware",
            "software_licence",
            "furniture",
            "vehicle",
            "building",
            "land",
            "goodwill",
            "patent",
            "trademark",
            "other_intangible"
          ],
          "type": "string"
        },
        {
          "const": "right_of_use",
          "description": "IFRS 16 / ASC 842 right-of-use asset (operating lease).",
          "type": "string"
        }
      ]
    },
    "DepreciationMethod": {
      "description": "Depreciation method.",
      "oneOf": [
        {
          "const": "straight_line",
          "description": "Equal expense per period across the useful life.",
          "type": "string"
        },
        {
          "const": "declining_balance",
          "description": "Faster front-loaded depreciation (DE: geometrisch-degressiv,\nsuspended 2008-2025 in DE; allowed 2024-2025 transitionally).",
          "type": "string"
        },
        {
          "const": "units_of_production",
          "description": "Depreciation tracks units produced / hours used.",
          "type": "string"
        },
        {
          "const": "sum_of_years_digits",
          "description": "US sum-of-years-digits method (rare; preserved for legacy).",
          "type": "string"
        }
      ]
    },
    "DepreciationPeriod": {
      "description": "One period's depreciation slice.",
      "properties": {
        "accumulated": {
          "$ref": "#/$defs/MonetaryAmount"
        },
        "depreciation": {
          "$ref": "#/$defs/MonetaryAmount"
        },
        "gl_entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/PathRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "net_book_value": {
          "$ref": "#/$defs/MonetaryAmount"
        },
        "period": {
          "$ref": "#/$defs/PathRef"
        }
      },
      "required": [
        "period",
        "depreciation",
        "accumulated",
        "net_book_value"
      ],
      "type": "object"
    },
    "GwgTreatment": {
      "description": "GWG (Geringwertige Wirtschaftsgüter) treatment per §6 Abs. 2 EStG.\nDE-specific tax acceleration for low-value assets.",
      "oneOf": [
        {
          "const": "sofort",
          "description": "Sofortabschreibung — fully expensed in year of acquisition (≤€800\nnet 2024+; ≤€1000 net 2018-2023).",
          "type": "string"
        },
        {
          "const": "pool",
          "description": "Sammelposten / Pool — collected in a pool and depreciated over 5\nyears (€250 < net ≤ €1000).",
          "type": "string"
        },
        {
          "const": "normal",
          "description": "Normal depreciation per AfA table.",
          "type": "string"
        }
      ]
    },
    "ImpairmentEvent": {
      "description": "Impairment event under IAS 36 / ASC 360.",
      "properties": {
        "amount": {
          "$ref": "#/$defs/MonetaryAmount"
        },
        "date": {
          "$ref": "#/$defs/IsoDate"
        },
        "gl_entry": {
          "anyOf": [
            {
              "$ref": "#/$defs/PathRef"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "date",
        "amount",
        "reason"
      ],
      "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"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/fixed-asset.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Fixed-asset record.",
  "properties": {
    "acquired_at": {
      "$ref": "#/$defs/IsoDate",
      "description": "Acquisition date."
    },
    "acquisition_cost": {
      "$ref": "#/$defs/MonetaryAmount",
      "description": "Original cost."
    },
    "category": {
      "$ref": "#/$defs/AssetCategory",
      "description": "Category."
    },
    "depreciation_method": {
      "$ref": "#/$defs/DepreciationMethod",
      "description": "Depreciation method."
    },
    "description": {
      "description": "Human-readable description.",
      "type": "string"
    },
    "disposal_proceeds": {
      "anyOf": [
        {
          "$ref": "#/$defs/MonetaryAmount"
        },
        {
          "type": "null"
        }
      ],
      "description": "Disposal proceeds."
    },
    "disposed_at": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ],
      "description": "Disposal date (rare)."
    },
    "entity": {
      "$ref": "#/$defs/PathRef",
      "description": "Subject entity."
    },
    "gl_account_asset": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "CoA account for the asset itself."
    },
    "gl_account_depreciation": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "CoA account for accumulated depreciation."
    },
    "gwg_treatment": {
      "anyOf": [
        {
          "$ref": "#/$defs/GwgTreatment"
        },
        {
          "type": "null"
        }
      ],
      "description": "GWG treatment for DE assets."
    },
    "id": {
      "$ref": "#/$defs/PathRef",
      "description": "PathRef identifier, conventionally\n`financials/fixed-assets/<entity>/<slug>`."
    },
    "impairment_events": {
      "description": "Impairment events.",
      "items": {
        "$ref": "#/$defs/ImpairmentEvent"
      },
      "type": "array"
    },
    "note": {
      "description": "Free-form note.",
      "type": [
        "string",
        "null"
      ]
    },
    "salvage_value": {
      "anyOf": [
        {
          "$ref": "#/$defs/MonetaryAmount"
        },
        {
          "type": "null"
        }
      ],
      "description": "Salvage / residual value (defaults to 0)."
    },
    "schedule": {
      "description": "Per-period schedule.",
      "items": {
        "$ref": "#/$defs/DepreciationPeriod"
      },
      "type": "array"
    },
    "tax_basis_diff": {
      "anyOf": [
        {
          "$ref": "#/$defs/MonetaryAmount"
        },
        {
          "type": "null"
        }
      ],
      "description": "Book-vs-tax basis divergence (deferred tax driver)."
    },
    "useful_life_months": {
      "description": "Useful life in months.",
      "format": "int32",
      "type": "integer"
    }
  },
  "required": [
    "id",
    "entity",
    "description",
    "category",
    "acquired_at",
    "acquisition_cost",
    "useful_life_months",
    "depreciation_method",
    "schedule"
  ],
  "title": "FixedAsset",
  "type": "object",
  "x-corpospec-pillar": "financials"
}