# [Digital](../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["Party Role"] class Account["Account"] class CustomerPreferences["Customer Preferences"] ``` ```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 ```