Add accounts, members, and processor-agnostic payment linking

- account table (billing entity, soft-delete, company-scoped)
- member table (people on an account, is_minor from DOB)
- account_processor_link table (maps accounts to any payment
  processor — stripe, global_payments — instead of stripe_customer_id
  directly on account)
- Full CRUD routes + search (name, email, phone, account_number)
- Member routes nested under accounts with isMinor auto-calculation
- Zod validation schemas in @forte/shared
- 19 tests passing
This commit is contained in:
Ryan Moon
2026-03-27 17:41:33 -05:00
parent 979a9a2c00
commit 5ff31ad782
12 changed files with 1429 additions and 1 deletions

View File

@@ -3,8 +3,9 @@ import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'
import * as storeSchema from '../db/schema/stores.js'
import * as userSchema from '../db/schema/users.js'
import * as accountSchema from '../db/schema/accounts.js'
const schema = { ...storeSchema, ...userSchema }
const schema = { ...storeSchema, ...userSchema, ...accountSchema }
declare module 'fastify' {
interface FastifyInstance {