Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -0,0 +1,68 @@
|
||||
// VA-P28f: personal calendars for HiveGrid's tenant-less admin sales workspace.
|
||||
//
|
||||
// OAuth credentials remain exclusively in AdminDataConnection. Calendar sync
|
||||
// stores provider cursors plus anonymous busy intervals; titles, descriptions
|
||||
// and attendee lists from unrelated external events are deliberately discarded.
|
||||
|
||||
enum AdminCalendarConnectionStatus {
|
||||
active
|
||||
degraded
|
||||
reconnect_required
|
||||
revoked
|
||||
}
|
||||
|
||||
enum AdminCalendarSyncStatus {
|
||||
pending
|
||||
syncing
|
||||
active
|
||||
recovery_required
|
||||
failed
|
||||
}
|
||||
|
||||
model AdminCalendarConnection {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
archivedAt DateTime?
|
||||
adminUserId String
|
||||
dataConnectionId String @unique
|
||||
externalCalendarId String
|
||||
externalCalendarLabel String?
|
||||
timeZone String
|
||||
status AdminCalendarConnectionStatus @default(active)
|
||||
lastSyncAt DateTime?
|
||||
lastErrorCode String?
|
||||
healthMessageKey String?
|
||||
webhookExpiresAt DateTime?
|
||||
|
||||
adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Restrict)
|
||||
dataConnection AdminDataConnection @relation(fields: [dataConnectionId], references: [id], onDelete: Restrict)
|
||||
syncCursors AdminCalendarSyncCursor[]
|
||||
bookings AdminBooking[]
|
||||
|
||||
@@unique([adminUserId, externalCalendarId], name: "admin_calendar_owner_external_key")
|
||||
@@index([adminUserId, status, archivedAt], name: "admin_calendar_owner_status_idx")
|
||||
@@index([status, webhookExpiresAt], name: "admin_calendar_webhook_renewal_idx")
|
||||
}
|
||||
|
||||
model AdminCalendarSyncCursor {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
adminUserId String
|
||||
calendarConnectionId String
|
||||
externalCalendarId String
|
||||
cursorToken String?
|
||||
deltaLink String?
|
||||
busyIntervals Json @default("[]")
|
||||
status AdminCalendarSyncStatus @default(pending)
|
||||
lastFullSyncAt DateTime?
|
||||
lastIncrementalSyncAt DateTime?
|
||||
recoveryRequestedAt DateTime?
|
||||
lastErrorCode String?
|
||||
|
||||
calendarConnection AdminCalendarConnection @relation(fields: [calendarConnectionId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([calendarConnectionId, externalCalendarId], name: "admin_calendar_cursor_external_key")
|
||||
@@index([adminUserId, status, updatedAt], name: "admin_calendar_cursor_owner_status_idx")
|
||||
}
|
||||
Reference in new issue
Block a user