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
+12 -1
View File
@@ -64,6 +64,7 @@ export const ModelName = {
ProjectMember: 'ProjectMember',
ShareLink: 'ShareLink',
Asset: 'Asset',
StorageKey: 'StorageKey',
AssetMetadataValue: 'AssetMetadataValue',
AssetComment: 'AssetComment',
AssetCommentAttachment: 'AssetCommentAttachment',
@@ -270,7 +271,6 @@ export const AssetScalarFieldEnum = {
id: 'id',
name: 'name',
nameNgram: 'nameNgram',
key: 'key',
type: 'type',
mediaType: 'mediaType',
fileCount: 'fileCount',
@@ -285,6 +285,7 @@ export const AssetScalarFieldEnum = {
updatedAt: 'updatedAt',
parentId: 'parentId',
targetId: 'targetId',
storageKeyId: 'storageKeyId',
creatorId: 'creatorId',
taskId: 'taskId',
projectId: 'projectId'
@@ -293,6 +294,16 @@ export const AssetScalarFieldEnum = {
export type AssetScalarFieldEnum = (typeof AssetScalarFieldEnum)[keyof typeof AssetScalarFieldEnum]
export const StorageKeyScalarFieldEnum = {
id: 'id',
key: 'key',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type StorageKeyScalarFieldEnum = (typeof StorageKeyScalarFieldEnum)[keyof typeof StorageKeyScalarFieldEnum]
export const AssetMetadataValueScalarFieldEnum = {
id: 'id',
assetId: 'assetId',