feat(08-01): add offer_phases, offer_phase_services, and quotes table schema

- Create offer_phases table (hierarchical phases within offer micros)
- Create offer_phase_services junction (phases → unified services)
- Create quotes table (separate headers from line items)
- Create leads placeholder table (FK for quotes, Phase 10 CRM)
- Update quote_items: add quote_id, offer_micro_id, offer_phase_id columns
- Update projects: add offer_id, created_from_lead_id columns
- Update phases: add offer_phase_id column for audit trail
- Add all Drizzle relations and TypeScript types
- Build verified with npm run build

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 07:14:56 +02:00
parent 645f33cdd4
commit 37fe5eae48
2 changed files with 137 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
// Export offer-related types from schema for use in components and API routes
export type {
OfferPhase,
NewOfferPhase,
OfferPhaseService,
NewOfferPhaseService,
Quote,
NewQuote,
Lead,
NewLead,
} from "@/db/schema";