{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/JournalEntryCreate",
  "title": "JournalEntryCreate",
  "type": "object",
  "required": [
    "journalDate",
    "company",
    "lines"
  ],
  "properties": {
    "journalDate": {
      "type": "string",
      "format": "date",
      "description": "Date of the journal entry"
    },
    "description": {
      "type": "string",
      "description": "Description of the journal entry"
    },
    "company": {
      "$ref": "#/components/schemas/CompanyRef"
    },
    "currency": {
      "$ref": "#/components/schemas/CurrencyRef"
    },
    "lines": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/JournalLine"
      },
      "minItems": 2,
      "description": "Journal entry lines (minimum two for debit/credit)"
    }
  }
}