People & households
Before anything is owned or owed, there are people. Parties are their own flat array, a Case wraps the application, households group who is assessed together — and everywhere a person plays a part, they are referenced by id through a role, never nested.
Four things that hold the applicants
Party — a person or an organization
Everyone in a case lives in state.parties[], each with its own id. partyKind discriminates INDIVIDUAL_PERSON (carries personalInformation — nin, name) from ORGANIZATION (carries organizationInformation).
Case — the application
One Case wraps the application: its purpose (PURCHASE, …), status, and the consents each party has given (e.g. CREDIT_CHECK).
Household — who shares an economy
households[] group parties that are assessed together: members with a personRole, a mainHousehold, and relationships. Affordability is computed per household.
Roles link people to things
A party is never nested inside a loan or a house. owners / accountRoles / mortgagors carry { partyId, role, share } — the same party id appears wherever they play a part.
Parties on their own array, grouped by the case
Two applicants as parties, then the case that groups them into a household and records their consents. Hover a partyId to trace one person from parties[] into the household, stakeholders and consents.
A person attaches through a role
Wherever a party plays a part — OWNER of a home, DEBTOR on a loan, MORTGAGOR on a deed — the entity holds a role that points back by partyId. Same ids as above; nothing about the person is copied in.