feat: add Plivo SMS admin panel with rate limits

This commit is contained in:
2026-04-23 15:02:39 -04:00
parent 3029ce7053
commit d72cc63c7a
7 changed files with 549 additions and 23 deletions
+19
View File
@@ -18,12 +18,15 @@ model User {
totalEarned Int @default(0) @map("total_earned")
totalSpent Int @default(0) @map("total_spent")
watchTimeMinutes Int @default(0) @map("watch_time_minutes")
phoneNumber String? @map("phone_number")
smsOptOut Boolean @default(false) @map("sms_opt_out")
transactions Transaction[]
watchEvents WatchEvent[]
contentRequests ContentRequest[]
sessions Session[]
kofiPayments KofiPayment[]
smsLogs SmsLog[]
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@ -140,6 +143,22 @@ model KofiPayment {
@@map("kofi_payments")
}
model SmsLog {
id String @id @default(uuid())
userId String? @map("user_id")
user User? @relation(fields: [userId], references: [id])
phoneNumber String @map("phone_number")
message String
status String @default("SENT")
plivoUuid String? @map("plivo_uuid")
error String?
sentAt DateTime @default(now()) @map("sent_at")
@@index([userId])
@@index([sentAt])
@@map("sms_logs")
}
enum TransactionType {
EARN
SPEND