chore(server): move domain interfaces (#8124)

move domain interfaces
This commit is contained in:
Daniel Dietzler
2024-03-20 21:42:58 +01:00
committed by GitHub
parent 2dcce03352
commit 84f7ca855a
150 changed files with 436 additions and 447 deletions

View 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>;
}