feat: add Plivo SMS admin panel with rate limits
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user