mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-01 23:48:53 +02:00
💳 Support payments with Stripe (#822)
This commit is contained in:
parent
969ae35971
commit
6f425edeaa
20 changed files with 712 additions and 229 deletions
|
@ -17,15 +17,18 @@ enum TimeFormat {
|
|||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
email String @unique() @db.Citext
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime? @updatedAt @map("updated_at")
|
||||
comments Comment[]
|
||||
polls Poll[]
|
||||
watcher Watcher[]
|
||||
events Event[]
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
email String @unique() @db.Citext
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime? @updatedAt @map("updated_at")
|
||||
comments Comment[]
|
||||
polls Poll[]
|
||||
watcher Watcher[]
|
||||
events Event[]
|
||||
customerId String? @map("customer_id")
|
||||
subscription Subscription? @relation(fields: [subscriptionId], references: [id])
|
||||
subscriptionId String? @unique @map("subscription_id")
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
|
@ -52,6 +55,21 @@ model UserPaymentData {
|
|||
@@map("user_payment_data")
|
||||
}
|
||||
|
||||
model Subscription {
|
||||
id String @id
|
||||
priceId String @map("price_id")
|
||||
active Boolean
|
||||
currency String?
|
||||
interval String?
|
||||
intervalCount Int? @map("interval_count")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
periodStart DateTime @map("period_start")
|
||||
periodEnd DateTime @map("period_end")
|
||||
user User?
|
||||
|
||||
@@map("subscriptions")
|
||||
}
|
||||
|
||||
model UserPreferences {
|
||||
userId String @id @map("user_id")
|
||||
timeZone String? @map("time_zone")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue