mirror of
https://github.com/immich-app/immich.git
synced 2025-12-26 17:25:00 +03:00
12
server/src/interfaces/move.repository.ts
Normal file
12
server/src/interfaces/move.repository.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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>;
|
||||
}
|
||||
Reference in New Issue
Block a user