fix: remove old stale data
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
2026-10-22 01:32:19 +02:00
parent cef6ee5820
commit 48ad82acd1
5 changed files with 69 additions and 60 deletions
+1 -36
View File
@@ -15,7 +15,6 @@ model Venue {
devices Device[]
clientUsers ClientUser[]
tabOwnerships TabOwnership[]
remoteCommands RemoteCommand[]
auditLogs AuditLog[]
regCodes RegistrationCode[]
@@ -43,9 +42,7 @@ model Device {
revokedAt DateTime?
createdAt DateTime @default(now())
venue Venue @relation(fields: [venueId], references: [id])
tabSnapshots OpenTabSnapshot[]
tabOwnerships TabOwnership[]
venue Venue @relation(fields: [venueId], references: [id])
remoteCommands RemoteCommand[]
tabEvents TabEvent[]
settlements Settlement[]
@@ -81,38 +78,6 @@ model RegistrationCode {
@@index([venueId])
}
model OpenTabSnapshot {
id String @id @default(uuid())
deviceId String
tabId String
customerName String
version Int
totalInCents Int
itemCount Int
// The tab's lines as reported by the terminal: [{ productName, quantity, unitPriceInCents }].
// Null for terminals running an app version that doesn't report them.
items Json?
reportedAt DateTime
device Device @relation(fields: [deviceId], references: [id])
@@unique([deviceId, tabId])
@@index([deviceId])
@@index([tabId, reportedAt])
}
model TabOwnership {
tabId String
venueId String
deviceId String
lastReportedAt DateTime
venue Venue @relation(fields: [venueId], references: [id])
device Device @relation(fields: [deviceId], references: [id])
@@id([venueId, tabId])
}
// A request from the dashboard. close_tab used to be executed by the owning terminal; the server now settles
// the tab itself and records the command as completed right away, for the history.
model RemoteCommand {