mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
feat(nbstore): add cloud implementation (#8810)
This commit is contained in:
@@ -106,6 +106,7 @@ model Workspace {
|
||||
permissions WorkspaceUserPermission[]
|
||||
pagePermissions WorkspacePageUserPermission[]
|
||||
features WorkspaceFeature[]
|
||||
blobs Blob[]
|
||||
|
||||
@@map("workspaces")
|
||||
}
|
||||
@@ -568,3 +569,19 @@ model Invoice {
|
||||
@@index([targetId])
|
||||
@@map("invoices")
|
||||
}
|
||||
// Blob table only exists for fast non-data queries.
|
||||
// like, total size of blobs in a workspace, or blob list for sync service.
|
||||
// it should only be a map of metadata of blobs stored anywhere else
|
||||
model Blob {
|
||||
workspaceId String @map("workspace_id") @db.VarChar
|
||||
key String @db.VarChar
|
||||
size Int @db.Integer
|
||||
mime String @db.VarChar
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3)
|
||||
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(3)
|
||||
|
||||
workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@id([workspaceId, key])
|
||||
@@map("blobs")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user