feat: implement group pre-registration feature with approval and rejection workflows
- Add API endpoints for managing group pre-registrations, including approval and rejection. - Create database migration for `group_pre_registrations` table and associated enum for status. - Implement use cases for listing, approving, and rejecting pre-registrations. - Add frontend components for displaying pre-registration details and managing approvals/rejections. - Update shared schemas to include pre-registration data structures and validation. - Remove obsolete `WaitlistNoticeCard` component and replace with `PreRegistrationNoticeCard`.
This commit is contained in:
@@ -20,6 +20,7 @@ model Group {
|
||||
attendees Attendee[]
|
||||
payments Payment[]
|
||||
waitlist GroupWaitlistEntry[]
|
||||
preRegistrations GroupPreRegistration[]
|
||||
classSessions ClassSession[]
|
||||
|
||||
@@map("groups")
|
||||
@@ -157,6 +158,30 @@ enum WaitlistStatus {
|
||||
DECLINED
|
||||
}
|
||||
|
||||
enum PreRegistrationStatus {
|
||||
PENDING
|
||||
APPROVED
|
||||
REJECTED
|
||||
}
|
||||
|
||||
model GroupPreRegistration {
|
||||
id String @id @default(cuid())
|
||||
groupId String
|
||||
fullName String
|
||||
phone String
|
||||
email String?
|
||||
status PreRegistrationStatus @default(PENDING)
|
||||
reviewedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([groupId, phone])
|
||||
@@index([groupId])
|
||||
@@map("group_pre_registrations")
|
||||
}
|
||||
|
||||
enum PaymentProvider {
|
||||
MERCADO_PAGO
|
||||
STRIPE
|
||||
|
||||
Reference in New Issue
Block a user