added stripe checkout with stripe express onboarding for businesses

This commit is contained in:
Rajpreet0 2026-05-15 01:57:21 +02:00
parent 04b8b277e7
commit 6006fbd9fa
18 changed files with 965 additions and 126 deletions

View file

@ -99,6 +99,8 @@ model Business {
subscription Json?
slug String? @unique
isPublic Boolean @default(false)
stripeAccountId String? @unique // Stripe Connect Account ID
stripeAccountStatus String? // "pending" | "active" | "restricted"
manager Manager @relation(fields: [managerId], references: [id])
courses Course[]
createdAt DateTime @default(now())
@ -152,6 +154,11 @@ model CourseBooking {
id String @id @default(uuid())
courseId String
userId String
paymentStatus String @default("pending") // "pending" | "paid" | "failed" | "refunded"
stripeSessionId String? @unique
stripePaymentIntentId String? @unique
amountPaid Float? // tatsächlich gezahlter Betrag in EUR
platformFee Float? // unsere Service-Fee in EUR
course Course @relation(fields: [courseId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())