feat: ko-fi integration for credit purchases
This commit is contained in:
@@ -23,6 +23,7 @@ model User {
|
||||
watchEvents WatchEvent[]
|
||||
contentRequests ContentRequest[]
|
||||
sessions Session[]
|
||||
kofiPayments KofiPayment[]
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
@@ -118,11 +119,33 @@ model SystemSettings {
|
||||
@@map("system_settings")
|
||||
}
|
||||
|
||||
model KofiPayment {
|
||||
id String @id @default(uuid())
|
||||
kofiTransactionId String @unique @map("kofi_transaction_id")
|
||||
email String
|
||||
fromName String @map("from_name")
|
||||
amount Float
|
||||
creditsGranted Int @map("credits_granted")
|
||||
message String?
|
||||
isPublic Boolean @default(true) @map("is_public")
|
||||
currency String @default("USD")
|
||||
userId String? @map("user_id")
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
status String @default("PENDING")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@index([userId])
|
||||
@@index([email])
|
||||
@@index([status])
|
||||
@@map("kofi_payments")
|
||||
}
|
||||
|
||||
enum TransactionType {
|
||||
EARN
|
||||
SPEND
|
||||
BONUS
|
||||
ADJUSTMENT
|
||||
PURCHASE
|
||||
}
|
||||
|
||||
enum RequestStatus {
|
||||
|
||||
Reference in New Issue
Block a user