mirror of
https://github.com/immich-app/immich.git
synced 2026-03-27 04:11:15 +03:00
feat(server): SyncAssetEditV1 (#26446)
* feat: SyncAssetEditV1 * fix: audit table import * fix: sql tools table fetch * fix: medium tests (wip) * fix: circ dependency * chore: finalize tests * chore: codegen/lint * fix: code review
This commit is contained in:
@@ -4,7 +4,7 @@ import { AssetEditTable } from 'src/schema/tables/asset-edit.table';
|
||||
import { AssetFactory } from 'test/factories/asset.factory';
|
||||
import { build } from 'test/factories/builder.factory';
|
||||
import { AssetEditLike, AssetLike, FactoryBuilder } from 'test/factories/types';
|
||||
import { newUuid } from 'test/small.factory';
|
||||
import { newDate, newUuid } from 'test/small.factory';
|
||||
|
||||
export class AssetEditFactory {
|
||||
private constructor(private readonly value: Selectable<AssetEditTable>) {}
|
||||
@@ -15,6 +15,7 @@ export class AssetEditFactory {
|
||||
|
||||
static from(dto: AssetEditLike = {}) {
|
||||
const id = dto.id ?? newUuid();
|
||||
const updateId = dto.updateId ?? newUuid();
|
||||
|
||||
return new AssetEditFactory({
|
||||
id,
|
||||
@@ -22,6 +23,8 @@ export class AssetEditFactory {
|
||||
action: AssetEditAction.Crop,
|
||||
parameters: { x: 5, y: 6, width: 200, height: 100 },
|
||||
sequence: 1,
|
||||
updateId,
|
||||
updatedAt: newDate(),
|
||||
...dto,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user