Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -0,0 +1,68 @@
|
||||
// R-P11b (P11 Dashboard) — typed tenant dashboard layouts.
|
||||
//
|
||||
// AD-21: self-contained schema. User references are bare String scalars so this
|
||||
// slice does not touch accounts/core back-relations while the v1 fixed role
|
||||
// layouts stay independent from later drag/drop customization.
|
||||
|
||||
enum DashboardRole {
|
||||
gf
|
||||
office
|
||||
monteur
|
||||
}
|
||||
|
||||
model Dashboard {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
tenantId String
|
||||
name String
|
||||
description String?
|
||||
role DashboardRole
|
||||
isDefaultForRole Boolean @default(true)
|
||||
isShared Boolean @default(true)
|
||||
isDemoData Boolean @default(false)
|
||||
archivedAt DateTime?
|
||||
|
||||
layouts DashboardLayout[]
|
||||
instances WidgetInstance[]
|
||||
|
||||
@@unique([tenantId, role, name])
|
||||
@@index([tenantId, role, isDefaultForRole, archivedAt])
|
||||
@@index([tenantId, isShared, archivedAt])
|
||||
}
|
||||
|
||||
model DashboardLayout {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
tenantId String
|
||||
dashboardId String
|
||||
userId String?
|
||||
widgets Json @default("[]")
|
||||
layoutData Json @default("{}")
|
||||
isDemoData Boolean @default(false)
|
||||
archivedAt DateTime?
|
||||
|
||||
dashboard Dashboard @relation(fields: [dashboardId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([dashboardId, userId])
|
||||
@@index([tenantId, dashboardId, userId, archivedAt])
|
||||
}
|
||||
|
||||
model WidgetInstance {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
tenantId String
|
||||
dashboardId String
|
||||
widgetCatalogKey String
|
||||
config Json @default("{}")
|
||||
position Json @default("{}")
|
||||
size Json @default("{}")
|
||||
isDemoData Boolean @default(false)
|
||||
archivedAt DateTime?
|
||||
|
||||
dashboard Dashboard @relation(fields: [dashboardId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([tenantId, dashboardId, widgetCatalogKey, archivedAt])
|
||||
}
|
||||
Reference in new issue
Block a user