Enhance Prisma schema and documentation for dashboard features
- Added new models for DashboardAccessRule and DashboardAuditLog to the Prisma schema, improving access control and logging capabilities. - Updated GuildSettings model to include timezone support. - Revised PHASE-TRACKING.md to reflect the completion of Phase 5 and outline upcoming Phase 6 features, including dashboard layout and settings framework. - Exported new phase 6 features in shared index for better modularity.
This commit is contained in:
@@ -51,16 +51,47 @@ model Guild {
|
||||
socialFeeds SocialFeed[]
|
||||
scheduledMessages ScheduledMessage[]
|
||||
guildBackups GuildBackup[]
|
||||
dashboardAccessRules DashboardAccessRule[]
|
||||
dashboardAuditLogs DashboardAuditLog[]
|
||||
}
|
||||
|
||||
model GuildSettings {
|
||||
id String @id @default(cuid())
|
||||
guildId String @unique
|
||||
locale String @default("de")
|
||||
timezone String @default("Europe/Berlin")
|
||||
moderationEnabled Boolean @default(true)
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model DashboardAccessRule {
|
||||
id String @id @default(cuid())
|
||||
guildId String
|
||||
roleId String
|
||||
modules Json
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([guildId, roleId])
|
||||
@@index([guildId])
|
||||
}
|
||||
|
||||
model DashboardAuditLog {
|
||||
id String @id @default(cuid())
|
||||
guildId String?
|
||||
actorUserId String
|
||||
action String
|
||||
path String?
|
||||
before Json?
|
||||
after Json?
|
||||
createdAt DateTime @default(now())
|
||||
guild Guild? @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([guildId, createdAt])
|
||||
@@index([actorUserId, createdAt])
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
Reference in New Issue
Block a user