feat(db): update Asset.sizeByte and AiUsage token fields to BigInt

This commit is contained in:
yiling
2026-07-29 20:14:23 +08:00
parent 5b19cfe98e
commit f161437797
17 changed files with 400 additions and 265 deletions
@@ -84,7 +84,7 @@ describe('VersionStackService', () => {
expect(stack.name).toBe('')
expect(stack.type).toBe(AssetType.version_stack)
expect(stack.fileCount).toBe(2)
expect(stack.sizeByte).toBe(300)
expect(Number(stack.sizeByte)).toBe(300)
expect(stack.parentId).toBe(parent.id)
expect(stack.sortIndex).toBe('abc')
@@ -44,7 +44,7 @@ export class VersionStackService {
} else if (f.parentId !== parentId) {
throw new Error('files do not have the same parent')
}
totalSize += f.sizeByte
totalSize += Number(f.sizeByte)
}
if (!parentId) {