1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-30 09:47:31 +02:00
immich/server/test/fixtures/memory.stub.ts
Jason Rasmussen cd0e537e3e
feat: persistent memories (#8330)
* feat: persistent memories

* refactor: use new add/remove asset utility
2024-04-02 10:23:17 -04:00

31 lines
807 B
TypeScript

import { MemoryEntity, MemoryType } from 'src/entities/memory.entity';
import { assetStub } from 'test/fixtures/asset.stub';
import { userStub } from 'test/fixtures/user.stub';
export const memoryStub = {
empty: <MemoryEntity>{
id: 'memoryEmpty',
createdAt: new Date(),
updatedAt: new Date(),
memoryAt: new Date(2024),
ownerId: userStub.admin.id,
owner: userStub.admin,
type: MemoryType.ON_THIS_DAY,
data: { year: 2024 },
isSaved: false,
assets: [],
},
memory1: <MemoryEntity>{
id: 'memory1',
createdAt: new Date(),
updatedAt: new Date(),
memoryAt: new Date(2024),
ownerId: userStub.admin.id,
owner: userStub.admin,
type: MemoryType.ON_THIS_DAY,
data: { year: 2024 },
isSaved: false,
assets: [assetStub.image1],
},
};