Booking Store
Component Detail
Data Layer
low complexity
backend
0
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Data access layer for demo bookings and leads in PostgreSQL. Provides repository methods for creating, querying, and managing booking records and their associated lead entries. Handles the relationship between leads and their demo booking requests.
booking-store
Responsibilities
- Create and persist lead records with contact and organization details
- Create and persist demo booking records linked to leads
- Query bookings by status, date range, or lead
- Detect duplicate submissions from the same email within a time window
Interfaces
insertLead(lead: LeadInput): Lead
insertBooking(booking: BookingInput): DemoBooking
findLeadByEmail(email: string): Lead | null
findBookingsByDateRange(start: Date, end: Date): DemoBooking[]
findBookingsByStatus(status: string): DemoBooking[]
checkDuplicateSubmission(email: string, windowMinutes: number): boolean
Relationships
Related Data Entities (4)
Data entities managed by this component