chore: remove asset stubs (#26187)

This commit is contained in:
Daniel Dietzler
2026-02-13 17:00:31 +01:00
committed by GitHub
parent ecb09501a5
commit 7cb355279e
18 changed files with 624 additions and 655 deletions
+34
View File
@@ -0,0 +1,34 @@
import { Selectable } from 'kysely';
import { PersonTable } from 'src/schema/tables/person.table';
import { PersonLike } from 'test/factories/types';
import { newDate, newUuid, newUuidV7 } from 'test/small.factory';
export class PersonFactory {
private constructor(private readonly value: Selectable<PersonTable>) {}
static create(dto: PersonLike = {}) {
return PersonFactory.from(dto).build();
}
static from(dto: PersonLike = {}) {
return new PersonFactory({
birthDate: null,
color: null,
createdAt: newDate(),
faceAssetId: null,
id: newUuid(),
isFavorite: false,
isHidden: false,
name: 'person',
ownerId: newUuid(),
thumbnailPath: '/data/thumbs/person-thumbnail.jpg',
updatedAt: newDate(),
updateId: newUuidV7(),
...dto,
});
}
build() {
return { ...this.value };
}
}