mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 09:36:08 +00:00
feat(admin): track and display per-user download egress for Bunny version downloads
This commit is contained in:
@@ -36,6 +36,30 @@ model User {
|
||||
@@map("users")
|
||||
}
|
||||
|
||||
enum DownloadEgressSource {
|
||||
ORIGINAL
|
||||
COMPRESSED
|
||||
}
|
||||
|
||||
model DownloadEgressEvent {
|
||||
id String @id @default(cuid())
|
||||
versionId String
|
||||
videoId String
|
||||
projectId String
|
||||
workspaceId String
|
||||
billedUserId String
|
||||
downloaderUserId String?
|
||||
source DownloadEgressSource
|
||||
quality Int?
|
||||
estimatedBytes BigInt @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([billedUserId, createdAt])
|
||||
@@index([workspaceId, createdAt])
|
||||
@@index([versionId, createdAt])
|
||||
@@map("download_egress_events")
|
||||
}
|
||||
|
||||
model Account {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
|
||||
Reference in New Issue
Block a user