mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor: database types (#17468)
This commit is contained in:
parent
ac65d46ec6
commit
4794eeca88
9 changed files with 44 additions and 39 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
AuthApiKey,
|
||||
AuthUser,
|
||||
Library,
|
||||
Memory,
|
||||
Partner,
|
||||
SidecarWriteAsset,
|
||||
User,
|
||||
|
|
@ -12,7 +13,7 @@ import {
|
|||
} from 'src/database';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { AssetStatus, AssetType, MemoryType, Permission, UserStatus } from 'src/enum';
|
||||
import { ActivityItem, MemoryItem, OnThisDayData } from 'src/types';
|
||||
import { ActivityItem, OnThisDayData } from 'src/types';
|
||||
|
||||
export const newUuid = () => randomUUID() as string;
|
||||
export const newUuids = () =>
|
||||
|
|
@ -196,7 +197,7 @@ const libraryFactory = (library: Partial<Library> = {}) => ({
|
|||
...library,
|
||||
});
|
||||
|
||||
const memoryFactory = (memory: Partial<MemoryItem> = {}) => ({
|
||||
const memoryFactory = (memory: Partial<Memory> = {}) => ({
|
||||
id: newUuid(),
|
||||
createdAt: newDate(),
|
||||
updatedAt: newDate(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue