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
-
EventId ↗ extern: EventId uuidBeim ersten Enqueue in die Outbox erzeugt, bei jeder Wiederholung identisch. Grundlage der fachlichen Deduplizierung.
-
AccountUuid Key uuidObjektidentitaet; muss dem Message-Key entsprechen.
-
Mode enum(CHANGE|INITIAL_LOAD)
-
ChangedFields Liste string[]Feldmaske: Pfade der geaenderten Einheiten, z. B. Matchcode, AccountTypeUuids. Jeder Pfad nennt genau eine Einheit des State.
-
Data AccountPatchData
47 Felder von
AccountPatchData-
Number optional intDefault:
nullNur bei Anlage; danach lehnt der Dienst einen CHANGE mit diesem Pfad ab (FIXED_AFTER_CREATE). -
Name optional stringDefault:
null -
Matchcode optional stringDefault:
null -
Email optional stringDefault:
null -
Phone optional stringDefault:
null -
Fax optional stringDefault:
null -
WebSite optional stringDefault:
null -
RevenueIdentificationNumber optional stringDefault:
null -
TaxNumber optional stringDefault:
null -
IsActive optional booleanDefault:
null -
IsLocked optional booleanDefault:
null -
Discount optional decimal(9,2)Default:
null -
AccountTypeUuids Liste optional ↗ extern: AccountType uuid[]Default:
nullDie vollstaendige neue Liste; im State nicht leerbar (NULL_NOT_ALLOWED), eine leere Liste ist erlaubt. -
Default:
null -
SupplierNumber optional intDefault:
null -
SupplierBookKeepingNumber optional stringDefault:
null -
SupplierBookKeepingCollectionAccount optional stringDefault:
null -
SupplierOwnCustomerNumber optional stringDefault:
null -
SupplierDiscount optional decimal(9,2)Default:
null -
SupplierIsDiscountAtPriceBase optional booleanDefault:
null -
SupplierIsExclusiveOfVAT optional booleanDefault:
null -
SupplierLimit optional decimal(18,2)Default:
null -
SupplierLimitCalculationKind optional intDefault:
null -
SupplierClassification optional intDefault:
null -
SupplierIsManufacturer optional booleanDefault:
null -
SupplierIsDistributor optional booleanDefault:
null -
SupplierIsCarrier optional booleanDefault:
null -
SupplierCarrierShortSign optional stringDefault:
null -
SupplierIsIsoCertified optional booleanDefault:
null -
SupplierRMANeeded optional booleanDefault:
null -
SupplierRMAInfo optional stringDefault:
null -
SupplierWEEE optional stringDefault:
null -
SupplierFreightCost optional decimal(18,2)Default:
null -
SupplierFreightCostFree optional decimal(18,2)Default:
null -
SupplierMinimumOrderValue optional decimal(18,2)Default:
null -
SupplierSmallQuantitiesExtraCharge optional decimal(18,2)Default:
null -
SupplierIsDirectDelivery optional booleanDefault:
null -
SupplierFreightCostDirectDelivery optional decimal(18,2)Default:
null -
SupplierFreightCostFreeAtDirectDelivery optional decimal(18,2)Default:
null -
SupplierMinimumOrderValueAtDirectDelivery optional decimal(18,2)Default:
null -
SupplierSmallQuantitiesExtraChargeAtDirectDelivery optional decimal(18,2)Default:
null -
SupplierIsFavorite optional booleanDefault:
null -
SupplierCommentOffer optional stringDefault:
null -
SupplierCommentOrder optional stringDefault:
null -
SupplierCommentDeliveryList optional stringDefault:
null -
SupplierCommentInvoice optional stringDefault:
null -
SupplierCommentCreditVoucher optional stringDefault:
null
-
-
ChangedByUuid optional ↗ extern: ChangedBy uuidDefault:
nullUUID des aendernden Mitarbeiters (Employee); null, wenn unbekannt. Audit. -
ChangedAt timestampZeitpunkt der Aenderung als UTC-Instant. Audit, kein Konfliktentscheider - es entscheidet die Kafka-Reihenfolge.
Referenziert von
- Kundensonderpreis
AccountSpecialPriceState.AccountUuid - Adresse
AddressPatch.Data.AccountUuid - Adresse
AddressState.AccountUuid - Artikel
ArticlePatch.Data.ManufacturerUuid - Artikel
ArticleState.ManufacturerUuid - Belegkondition
AssetConditionPatch.Data.CarrierUuid - Belegkondition
AssetConditionState.CarrierUuid - Filiale
BranchPatch.Data.AccountUuid - Filiale
BranchState.AccountUuid - Vertrag
ContractPatch.Data.AccountUuid - Vertrag
ContractPatch.Data.Receivers.AccountUuid - Vertrag
ContractState.AccountUuid - Vertrag
ContractState.Receivers.AccountUuid - Gutschrift
CreditVoucherPatch.Data.AccountUuid - Gutschrift
CreditVoucherPatch.Data.Receivers.AccountUuid - Gutschrift
CreditVoucherState.AccountUuid - Gutschrift
CreditVoucherState.Receivers.AccountUuid - Lieferschein
DeliveryListPatch.Data.AccountUuid - Lieferschein
DeliveryListPatch.Data.Receivers.AccountUuid - Lieferschein
DeliveryListState.AccountUuid - Lieferschein
DeliveryListState.Receivers.AccountUuid - Shop-Bestellung
EsOrderState.AccountUuid - Rechnung
InvoicePatch.Data.AccountUuid - Rechnung
InvoicePatch.Data.Receivers.AccountUuid - Rechnung
InvoiceState.AccountUuid - Rechnung
InvoiceState.Receivers.AccountUuid - Angebot
OfferPatch.Data.AccountUuid - Angebot
OfferPatch.Data.Receivers.AccountUuid - Angebot
OfferState.AccountUuid - Angebot
OfferState.Receivers.AccountUuid - Auftrag
OrderPatch.Data.AccountUuid - Auftrag
OrderPatch.Data.Receivers.AccountUuid - Auftrag
OrderState.AccountUuid - Auftrag
OrderState.Receivers.AccountUuid - Abholschein
PickupListPatch.Data.AccountUuid - Abholschein
PickupListPatch.Data.Receivers.AccountUuid - Abholschein
PickupListState.AccountUuid - Abholschein
PickupListState.Receivers.AccountUuid - Retoure
RmaPatch.Data.AccountUuid - Retoure
RmaPatch.Data.SupplierAccountUuid - Retoure
RmaPatch.Data.Articles.SupplierAccountUuid - Retoure
RmaState.AccountUuid - Retoure
RmaState.SupplierAccountUuid - Retoure
RmaState.Articles.SupplierAccountUuid - Lieferanten-Gutschrift
SupplierCreditVoucherPatch.Data.AccountUuid - Lieferanten-Gutschrift
SupplierCreditVoucherPatch.Data.Receivers.AccountUuid - Lieferanten-Gutschrift
SupplierCreditVoucherState.AccountUuid - Lieferanten-Gutschrift
SupplierCreditVoucherState.Receivers.AccountUuid - Lieferantenlieferschein
SupplierDeliveryListPatch.Data.AccountUuid - Lieferantenlieferschein
SupplierDeliveryListPatch.Data.Receivers.AccountUuid - Lieferantenlieferschein
SupplierDeliveryListState.AccountUuid - Lieferantenlieferschein
SupplierDeliveryListState.Receivers.AccountUuid - Lieferanten-Rechnung
SupplierInvoicePatch.Data.AccountUuid - Lieferanten-Rechnung
SupplierInvoicePatch.Data.Receivers.AccountUuid - Lieferanten-Rechnung
SupplierInvoiceState.AccountUuid - Lieferanten-Rechnung
SupplierInvoiceState.Receivers.AccountUuid - Anfrage
SupplierOfferPatch.Data.AccountUuid - Anfrage
SupplierOfferState.AccountUuid - Bestellung
SupplierOrderPatch.Data.AccountUuid - Bestellung
SupplierOrderPatch.Data.Receivers.AccountUuid - Bestellung
SupplierOrderState.AccountUuid - Bestellung
SupplierOrderState.Receivers.AccountUuid - Ticket
TicketPatch.Data.AccountUuid - Ticket
TicketState.AccountUuid - Web-Konto
WebAccountState.AccountUuid
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"
]
}