Implement premium features and GDPR compliance in bot and WebUI
- Added new models for premium tier configurations and assignments, enabling feature limits for free and premium users. - Introduced GDPR deletion logging and commands for user data management. - Enhanced logging configuration with retention days for audit logs. - Updated bot commands and job processing to include new premium and GDPR functionalities. - Improved localization with new keys for premium features and GDPR commands in both English and German. - Added UI components for managing premium settings and logging retention in the WebUI.
This commit is contained in:
@@ -62,6 +62,8 @@ model GuildSettings {
|
||||
locale String @default("de")
|
||||
timezone String @default("Europe/Berlin")
|
||||
moderationEnabled Boolean @default(true)
|
||||
/// Snipe/editsnipe storage and commands (SPEC: default off for privacy).
|
||||
snipeEnabled Boolean @default(false)
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
@@ -209,6 +211,8 @@ model LoggingConfig {
|
||||
ignoreBots Boolean @default(true)
|
||||
ignoredChannelIds String[] @default([])
|
||||
ignoredRoleIds String[] @default([])
|
||||
/// Days to keep Case / dashboard audit rows; 0 = keep forever.
|
||||
retentionDays Int @default(90)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
@@ -881,3 +885,50 @@ model OwnerAuditLog {
|
||||
@@index([createdAt])
|
||||
}
|
||||
|
||||
/// Per-tier limits and feature gates (FREE / PREMIUM). Seeded on first use.
|
||||
model PremiumTierConfig {
|
||||
tier String @id
|
||||
maxTags Int
|
||||
maxFeeds Int
|
||||
maxBackups Int
|
||||
/// JSON object of feature key → boolean (tags, feeds, guildbackup, …).
|
||||
features Json
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model GuildPremiumAssignment {
|
||||
id String @id @default(cuid())
|
||||
guildId String @unique
|
||||
tier String
|
||||
note String?
|
||||
assignedById String
|
||||
expiresAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([tier])
|
||||
}
|
||||
|
||||
model UserPremiumAssignment {
|
||||
id String @id @default(cuid())
|
||||
userId String @unique
|
||||
tier String
|
||||
note String?
|
||||
assignedById String
|
||||
expiresAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([tier])
|
||||
}
|
||||
|
||||
model GdprDeletionLog {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
guildId String?
|
||||
summary Json?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([userId, createdAt])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user