Data Models
What This Covers
This page maps the core domain types used across routes, server modules, and persistence. Use it when adding features, changing contracts, or reviewing model consistency.
Reference
Core shared interfaces (from apps/event-site/src/lib/types.ts):
| Domain | Key interfaces |
|---|---|
| Event | EventConfig, ThemeConfig |
| Schedule | ScheduleDay, ScheduleItem, ScheduleItemLocation |
| RSVP and pricing | RsvpConfig, PricingTier, CustomField, AddOn |
| Access | Group, GroupMember, DocumentPermission, ScheduleItemPermission |
| Content and documents | ContentSection, Document |
Persistence model families (from DB schema):
- attendees and approvals
- RSVPs and payments
- schedule and announcements
- photos and documents
- polls and voting
Examples
Model change workflow:
- Update shared types in
apps/event-site/src/lib/types.ts. - Update schema in
apps/event-site/src/lib/server/db/schema.tsif persistence changes. - Generate and apply migration.
bash
npm run db:generate
npm run db:migrate:localRelated Tasks
- Route/API contract checks: Routes and APIs
- Schema field contract: Config Schema
- Regression diagnosis: Troubleshooting