Add the Digital Core domain model from semprini-blog-dataproducts
The MD-DDL model (domain, entities, enums, the Canonical Party product declaration) moves into its own repository, owned by the domain's modelling team. Engineering teams consume its product declarations and generate products from semprini-data-product-templates. Adds the MD-DDL agent wrappers (md-ddl init), pyproject with md-ddl, and README/CLAUDE.md describing the team split and the handoff interface. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
commit
aeba56e5f2
41 files changed
+3007
No files matched your search
@@ -0,0 +1,89 @@
|
||||
# [Digital Core](../domain.md)
|
||||
|
||||
## Entities
|
||||
|
||||
### Customer
|
||||
|
||||
A Customer is a Party Role representing an active or prospective commercial relationship — someone who buys, subscribes, or holds an account with the business.
|
||||
|
||||
Customer is a role, not a person. The same human being who is a customer today may also be a supplier, an employee, or the payer on someone else's account. Modelling Customer as a role rather than as the party itself is what makes those coexist without duplicate records.
|
||||
|
||||
```mermaid
|
||||
---
|
||||
config:
|
||||
layout: elk
|
||||
---
|
||||
classDiagram
|
||||
class Customer{
|
||||
* Customer Number : string
|
||||
Onboarding Date : date
|
||||
Relationship Start Date : date
|
||||
}
|
||||
|
||||
Customer --|> PartyRole
|
||||
Customer "0..*" --> "0..*" Account : holds
|
||||
Customer "1" --> "0..1" CustomerPreferences : has
|
||||
|
||||
class PartyRole["<a href='./party_role.md'>Party Role</a>"]
|
||||
class Account["<a href='./account.md'>Account</a>"]
|
||||
class CustomerPreferences["<a href='./customer-preferences.md'>Customer Preferences</a>"]
|
||||
```
|
||||
|
||||
```yaml
|
||||
extends: Party Role
|
||||
existence: independent
|
||||
mutability: slowly_changing
|
||||
attributes:
|
||||
Customer Number:
|
||||
type: string
|
||||
identifier: primary
|
||||
description: >
|
||||
The customer identifier quoted in correspondence and used by service and support staff. Unlike the Party Identifier, this one is meant to be readable aloud over the phone.
|
||||
|
||||
Onboarding Date:
|
||||
type: date
|
||||
description: Date the customer onboarding process was completed.
|
||||
|
||||
Relationship Start Date:
|
||||
type: date
|
||||
description: >
|
||||
Date the customer relationship became effective. May precede the onboarding date where a relationship was migrated in from another system or acquired with another business.
|
||||
```
|
||||
|
||||
```yaml
|
||||
governance:
|
||||
retention_basis: Inherited from the domain default of 7 years post relationship end
|
||||
```
|
||||
|
||||
## Relationships
|
||||
|
||||
### Customer Holds Account
|
||||
|
||||
A Customer can hold one or more Accounts, and an Account can be held by more than one Customer. Joint accounts, business accounts with several authorised users, and family plans all need many-to-many — a shape that is painful to retrofit later, so it is declared up front.
|
||||
|
||||
```yaml
|
||||
source: Customer
|
||||
type: has
|
||||
target: Account
|
||||
cardinality: many-to-many
|
||||
granularity: atomic
|
||||
ownership: Customer
|
||||
relationship_attributes:
|
||||
- Holder Type (enum:Account Holder Type)
|
||||
- Holder Start Date
|
||||
- Holder End Date
|
||||
- Is Primary Holder
|
||||
```
|
||||
|
||||
### Customer Has Preferences
|
||||
|
||||
A Customer has at most one active Customer Preferences profile at a time.
|
||||
|
||||
```yaml
|
||||
source: Customer
|
||||
type: has
|
||||
target: Customer Preferences
|
||||
cardinality: one-to-one
|
||||
granularity: atomic
|
||||
ownership: Customer
|
||||
```
|
||||
Reference in new issue
Block a user