mirror of
https://github.com/immich-app/immich.git
synced 2024-12-23 02:06:15 +02:00
83 lines
2.2 KiB
TypeScript
83 lines
2.2 KiB
TypeScript
|
import { PersonEntity } from '@app/infra/entities';
|
||
|
import { userStub } from './user.stub';
|
||
|
|
||
|
export const personStub = {
|
||
|
noName: Object.freeze<PersonEntity>({
|
||
|
id: 'person-1',
|
||
|
createdAt: new Date('2021-01-01'),
|
||
|
updatedAt: new Date('2021-01-01'),
|
||
|
ownerId: userStub.admin.id,
|
||
|
owner: userStub.admin,
|
||
|
name: '',
|
||
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
||
|
faces: [],
|
||
|
isHidden: false,
|
||
|
}),
|
||
|
hidden: Object.freeze<PersonEntity>({
|
||
|
id: 'person-1',
|
||
|
createdAt: new Date('2021-01-01'),
|
||
|
updatedAt: new Date('2021-01-01'),
|
||
|
ownerId: userStub.admin.id,
|
||
|
owner: userStub.admin,
|
||
|
name: '',
|
||
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
||
|
faces: [],
|
||
|
isHidden: true,
|
||
|
}),
|
||
|
withName: Object.freeze<PersonEntity>({
|
||
|
id: 'person-1',
|
||
|
createdAt: new Date('2021-01-01'),
|
||
|
updatedAt: new Date('2021-01-01'),
|
||
|
ownerId: userStub.admin.id,
|
||
|
owner: userStub.admin,
|
||
|
name: 'Person 1',
|
||
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
||
|
faces: [],
|
||
|
isHidden: false,
|
||
|
}),
|
||
|
noThumbnail: Object.freeze<PersonEntity>({
|
||
|
id: 'person-1',
|
||
|
createdAt: new Date('2021-01-01'),
|
||
|
updatedAt: new Date('2021-01-01'),
|
||
|
ownerId: userStub.admin.id,
|
||
|
owner: userStub.admin,
|
||
|
name: '',
|
||
|
thumbnailPath: '',
|
||
|
faces: [],
|
||
|
isHidden: false,
|
||
|
}),
|
||
|
newThumbnail: Object.freeze<PersonEntity>({
|
||
|
id: 'person-1',
|
||
|
createdAt: new Date('2021-01-01'),
|
||
|
updatedAt: new Date('2021-01-01'),
|
||
|
ownerId: userStub.admin.id,
|
||
|
owner: userStub.admin,
|
||
|
name: '',
|
||
|
thumbnailPath: '/new/path/to/thumbnail.jpg',
|
||
|
faces: [],
|
||
|
isHidden: false,
|
||
|
}),
|
||
|
primaryPerson: Object.freeze<PersonEntity>({
|
||
|
id: 'person-1',
|
||
|
createdAt: new Date('2021-01-01'),
|
||
|
updatedAt: new Date('2021-01-01'),
|
||
|
ownerId: userStub.admin.id,
|
||
|
owner: userStub.admin,
|
||
|
name: 'Person 1',
|
||
|
thumbnailPath: '/path/to/thumbnail',
|
||
|
faces: [],
|
||
|
isHidden: false,
|
||
|
}),
|
||
|
mergePerson: Object.freeze<PersonEntity>({
|
||
|
id: 'person-2',
|
||
|
createdAt: new Date('2021-01-01'),
|
||
|
updatedAt: new Date('2021-01-01'),
|
||
|
ownerId: userStub.admin.id,
|
||
|
owner: userStub.admin,
|
||
|
name: 'Person 2',
|
||
|
thumbnailPath: '/path/to/thumbnail',
|
||
|
faces: [],
|
||
|
isHidden: false,
|
||
|
}),
|
||
|
};
|