NEXOWARE ConnectSchema-Explorer · Kafka-Backbone

Verträge / AccountPatch

Geschäftspartner Patch

AccountPatch · com.nexoware.connect.events

Aggregat
Account · State AccountState
Topic
account.patch je Mandant mit Präfix, z. B. <mandant>.account.patch
Key
AccountUuid
Nachrichtenart
Patch — ausdrückliche Teiländerungen, zusammengeführt vom Zusammenführungsdienst
Schreiber
c-entron Webservice (centron) , NEXOWARE.ERP (nexoware-erp)
Retention
30 Tage
Fassung
Version 1 (neueste)
Schema-ID
54

Patch-Pfad

Pflicht bei Anlage
Number, IsActive, IsLocked
Fix nach Anlage
Number

Kanonischer Vertrag, Version 1: Teilaenderung eines Geschaeftspartners (ADR-0023 Punkt 3). Alle Patches eines Accounts laufen ueber dieses eine Topic mit Key = AccountUuid; der Zusammenfuehrungsdienst wendet sie in Kafka-Reihenfolge an und veroeffentlicht den State auf account.state. Semantik: Pfad nicht in ChangedFields -> unveraendert (Wert in Data wird ignoriert); Pfad in ChangedFields mit Wert -> setzen; mit null -> leeren, sofern die Einheit im State nullable ist. Die Maske ist Pflicht, ohne Wildcard. AccountTypeUuids ist eine Einheit und wird als Ganzes ersetzt. Die Anlage eines Accounts braucht Number, IsActive und IsLocked (requiredOnCreate); Number setzt nur der anlegende Patch (fixedAfterCreate). Ein ungueltiger Patch wird als Ganzes abgelehnt. Fachliche Anforderungen: docs/contracts/account.md.

Fassungen

Felder

Referenziert von

Rohfassung

Schema dieser Fassung (Avro)
{
  "type": "record",
  "name": "AccountPatch",
  "namespace": "com.nexoware.connect.events",
  "doc": "Kanonischer Vertrag, Version 1: Teilaenderung eines Geschaeftspartners (ADR-0023 Punkt 3). Alle Patches eines Accounts laufen ueber dieses eine Topic mit Key = AccountUuid; der Zusammenfuehrungsdienst wendet sie in Kafka-Reihenfolge an und veroeffentlicht den State auf account.state. Semantik: Pfad nicht in ChangedFields -> unveraendert (Wert in Data wird ignoriert); Pfad in ChangedFields mit Wert -> setzen; mit null -> leeren, sofern die Einheit im State nullable ist. Die Maske ist Pflicht, ohne Wildcard. AccountTypeUuids ist eine Einheit und wird als Ganzes ersetzt. Die Anlage eines Accounts braucht Number, IsActive und IsLocked (requiredOnCreate); Number setzt nur der anlegende Patch (fixedAfterCreate). Ein ungueltiger Patch wird als Ganzes abgelehnt. Fachliche Anforderungen: docs/contracts/account.md.",
  "fields": [
    {
      "name": "EventId",
      "type": {
        "type": "string",
        "logicalType": "uuid"
      },
      "doc": "Beim ersten Enqueue in die Outbox erzeugt, bei jeder Wiederholung identisch. Grundlage der fachlichen Deduplizierung."
    },
    {
      "name": "AccountUuid",
      "type": {
        "type": "string",
        "logicalType": "uuid"
      },
      "doc": "Objektidentitaet; muss dem Message-Key entsprechen."
    },
    {
      "name": "Mode",
      "type": {
        "type": "enum",
        "name": "PatchMode",
        "doc": "CHANGE: lokal autorisierte Aenderung, LWW je Einheit nach Kafka-Reihenfolge. INITIAL_LOAD: Erstbefuellung beim Anschluss eines Produkts - setzt eine Einheit nur, wenn sie noch nie geschrieben wurde; ueberschreibt nie einen vorhandenen oder ausdruecklich geleerten Wert. Bewusst ohne Enum-Default: ein unbekannter kuenftiger Modus darf nicht still als CHANGE gelesen werden.",
        "symbols": [
          "CHANGE",
          "INITIAL_LOAD"
        ]
      }
    },
    {
      "name": "ChangedFields",
      "type": {
        "type": "array",
        "items": "string"
      },
      "doc": "Feldmaske: Pfade der geaenderten Einheiten, z. B. Matchcode, AccountTypeUuids. Jeder Pfad nennt genau eine Einheit des State."
    },
    {
      "name": "Data",
      "type": {
        "type": "record",
        "name": "AccountPatchData",
        "doc": "Typisierte Werte. Alle Felder optional, damit ein Producer ausserhalb der Maske nichts erfinden muss; ob null erlaubt ist, entscheidet der State-Vertrag.",
        "fields": [
          {
            "name": "Number",
            "type": [
              "null",
              "int"
            ],
            "doc": "Nur bei Anlage; danach lehnt der Dienst einen CHANGE mit diesem Pfad ab (FIXED_AFTER_CREATE).",
            "default": null
          },
          {
            "name": "Name",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "Matchcode",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "Email",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "Phone",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "Fax",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "WebSite",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "RevenueIdentificationNumber",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "TaxNumber",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "IsActive",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "IsLocked",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "Discount",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 9,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "AccountTypeUuids",
            "type": [
              "null",
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "logicalType": "uuid"
                }
              }
            ],
            "doc": "Die vollstaendige neue Liste; im State nicht leerbar (NULL_NOT_ALLOWED), eine leere Liste ist erlaubt.",
            "default": null
          },
          {
            "name": "EsGroupUuid",
            "type": [
              "null",
              {
                "type": "string",
                "logicalType": "uuid"
              }
            ],
            "default": null
          },
          {
            "name": "SupplierNumber",
            "type": [
              "null",
              "int"
            ],
            "default": null
          },
          {
            "name": "SupplierBookKeepingNumber",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierBookKeepingCollectionAccount",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierOwnCustomerNumber",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierDiscount",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 9,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierIsDiscountAtPriceBase",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierIsExclusiveOfVAT",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierLimit",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierLimitCalculationKind",
            "type": [
              "null",
              "int"
            ],
            "default": null
          },
          {
            "name": "SupplierClassification",
            "type": [
              "null",
              "int"
            ],
            "default": null
          },
          {
            "name": "SupplierIsManufacturer",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierIsDistributor",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierIsCarrier",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierCarrierShortSign",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierIsIsoCertified",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierRMANeeded",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierRMAInfo",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierWEEE",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierFreightCost",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierFreightCostFree",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierMinimumOrderValue",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierSmallQuantitiesExtraCharge",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierIsDirectDelivery",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierFreightCostDirectDelivery",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierFreightCostFreeAtDirectDelivery",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierMinimumOrderValueAtDirectDelivery",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierSmallQuantitiesExtraChargeAtDirectDelivery",
            "type": [
              "null",
              {
                "type": "bytes",
                "logicalType": "decimal",
                "precision": 18,
                "scale": 2
              }
            ],
            "default": null
          },
          {
            "name": "SupplierIsFavorite",
            "type": [
              "null",
              "boolean"
            ],
            "default": null
          },
          {
            "name": "SupplierCommentOffer",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierCommentOrder",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierCommentDeliveryList",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierCommentInvoice",
            "type": [
              "null",
              "string"
            ],
            "default": null
          },
          {
            "name": "SupplierCommentCreditVoucher",
            "type": [
              "null",
              "string"
            ],
            "default": null
          }
        ]
      }
    },
    {
      "name": "ChangedByUuid",
      "type": [
        "null",
        {
          "type": "string",
          "logicalType": "uuid"
        }
      ],
      "doc": "UUID des aendernden Mitarbeiters (Employee); null, wenn unbekannt. Audit.",
      "default": null
    },
    {
      "name": "ChangedAt",
      "type": {
        "type": "long",
        "logicalType": "timestamp-millis"
      },
      "doc": "Zeitpunkt der Aenderung als UTC-Instant. Audit, kein Konfliktentscheider - es entscheidet die Kafka-Reihenfolge."
    }
  ],
  "aggregate": "Account",
  "label": "Geschäftspartner",
  "topic": "account.patch",
  "key": "AccountUuid",
  "cleanupPolicy": "delete",
  "retentionMs": 2592000000,
  "partitions": 1,
  "writers": [
    "centron",
    "nexoware-erp"
  ],
  "requiredOnCreate": [
    "Number",
    "IsActive",
    "IsLocked"
  ],
  "fixedAfterCreate": [
    "Number"
  ]
}