feat(asset): decouple logical assets from physical storage with StorageKey and implement O(1) copy

This commit is contained in:
yiling
2026-05-25 00:52:45 +08:00
parent c5fba746be
commit 5dc3bdb38e
33 changed files with 2203 additions and 273 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ export async function getAssetActivity(assetId: string) {
return prisma.asset.findUnique({
where: { id: assetId },
include: {
storageKey: true,
project: {
include: {
team: true,
@@ -46,7 +47,7 @@ export async function updateAssetMetadataActivity(params: UpdateAssetMetadataPar
export async function getCommentActivity(commentId: string) {
return prisma.assetComment.findUnique({
where: { id: commentId },
include: { attachments: { include: { asset: true } } },
include: { attachments: { include: { asset: { include: { storageKey: true } } } } },
})
}