Implement database migration, notification logs, and one-click Mailcow setup

This commit is contained in:
AyrisAI
2026-05-14 16:49:11 +03:00
parent f328296c64
commit b024e20027
18 changed files with 1067 additions and 166 deletions

View File

@@ -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())
}