Make Account the group; replace User-set with Member-set + AccountMember

Refactorkamo-shared-library
Shipped
April 27, 2026 at 10:57 PM UTC
Author
Kamo
Commit
6ad6ed6

The Account is now itself the "group" — there's no separate billing-group concept. Members (org-scoped) belong to the Account directly via the new AccountMember join, with the per-member permission flags carried on that join. The first member to create the account becomes its primaryMember. Account.java: - Drop the ManyToMany Set<User> users field (and ACCOUNT_USERS join table) - Drop the User masterAccountHolder field - Replace with @OneToMany Set<AccountMember> members - primaryMember (Member) is the principal owner / first creator New entity: **************** - Carries the per-member permission flags: isLicensee, isAccountManager, canManageSubscription, canManageBilling - Renamed flag isGroupPlanManager -> isAccountManager (no more "group" framing) New repository: AccountMemberRepository (replaces AccountBillingMemberRepository which lived under commerce.billing.account). Removed: the old AccountBillingMember entity + repository under commerce.billing.account. **************** rewritten to read display name/email from the Account's own embedded fields (with primaryMember as fallback) instead of the dropped masterAccountHolder.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing