Files
semprini-domain-cdp-digital…/canonical-party/events/schemas/party_role.schema.json
T
paulandClaude Opus 5 cfb32d2d1b Add Canonical Party as generated in semprini-blog-dataproducts
The canonical data product for the Digital Core domain, copied unchanged from
the blog repository's products/canonical-party (generated by /agent-product
from data_model/data_products/canonical.md, 65 of 65 checks on the blog's
stack on 2026-09-09). The next commit adapts it to the domain platform.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 23:21:27 +12:00

52 lines
2.1 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:digital-core:canonical-party:party_role",
"title": "Party Role",
"description": "A Party Role is the capacity in which a Party acts. It separates who someone is from what they are doing. Canonical record published by Canonical Party. Property names are the ODS column names. Used for both the inbound topic (records producers publish) and the compacted outbound topic (every change, keyed by party_role_id).",
"type": "object",
"additionalProperties": false,
"required": ["party_role_id", "party_role_type", "party_id"],
"properties": {
"party_role_id": {
"type": "string",
"format": "uuid",
"description": "Globally unique identifier for this role instance. Distinct from the Party Identifier: one party holding two roles has two Role Identifiers."
},
"party_role_type": {
"type": "string",
"enum": ["Customer"],
"description": "Discriminator naming the subtype (Customer) that extends this role."
},
"role_status": {
"type": ["string", "null"],
"enum": ["Pending", "Active", "Suspended", "Closed", null],
"description": "The current lifecycle status of this role. Controls whether the role confers its business permissions."
},
"role_start_date": {
"type": ["string", "null"],
"format": "date",
"description": "The date this role became effective."
},
"role_end_date": {
"type": ["string", "null"],
"format": "date",
"description": "The date this role ceased to be effective. Null means the role is still open. Roles are closed rather than deleted, so that history stays intact."
},
"party_id": {
"type": "string",
"format": "uuid",
"description": "Identifier of the owning Party (Party Assumes Roles)."
},
"created_at": {
"type": ["string", "null"],
"format": "date-time",
"description": "Set by the ODS. Optional on the inbound topic."
},
"updated_at": {
"type": ["string", "null"],
"format": "date-time",
"description": "Set by the ODS on every change. Optional on the inbound topic."
}
}
}