Implement database migration, notification logs, and one-click Mailcow setup
This commit is contained in:
@@ -20,6 +20,7 @@ model User {
|
||||
telegramId String?
|
||||
mailboxMappings MailboxMapping[]
|
||||
notificationConfigs NotificationConfig[]
|
||||
notificationLogs NotificationLog[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
@@ -41,3 +42,23 @@ model NotificationConfig {
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
model NotificationLog {
|
||||
id String @id @default(cuid())
|
||||
mailbox String // Bildirim gelen mail adresi
|
||||
sender String? // Gönderen kişi
|
||||
subject String? // Konu
|
||||
status String // "SENT", "FAILED"
|
||||
error String? // Hata varsa detayı
|
||||
userId String? // Hangi kullanıcıya bildirim gittiği
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
model SystemLog {
|
||||
id String @id @default(cuid())
|
||||
level String // "INFO", "WARN", "ERROR"
|
||||
message String
|
||||
details String?
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user