Files
immich/server/src/interfaces/move.repository.ts
T
Daniel Dietzler 84f7ca855a chore(server): move domain interfaces (#8124)
move domain interfaces
2024-03-20 16:42:58 -04:00

13 lines
516 B
TypeScript

import { MoveEntity, PathType } from 'src/infra/entities/move.entity';
export const IMoveRepository = 'IMoveRepository';
export type MoveCreate = Pick<MoveEntity, 'oldPath' | 'newPath' | 'entityId' | 'pathType'> & Partial<MoveEntity>;
export interface IMoveRepository {
create(entity: MoveCreate): Promise<MoveEntity>;
getByEntity(entityId: string, pathType: PathType): Promise<MoveEntity | null>;
update(entity: Partial<MoveEntity>): Promise<MoveEntity>;
delete(move: MoveEntity): Promise<MoveEntity>;
}