refactor: domain repositories (#4403)

This commit is contained in:
Jason Rasmussen
2023-10-09 10:25:03 -04:00
committed by GitHub
parent b56f22aac3
commit 2ea080cacd
93 changed files with 313 additions and 227 deletions
@@ -0,0 +1,20 @@
import { PartnerEntity } from '@app/infra/entities';
export interface PartnerIds {
sharedById: string;
sharedWithId: string;
}
export enum PartnerDirection {
SharedBy = 'shared-by',
SharedWith = 'shared-with',
}
export const IPartnerRepository = 'IPartnerRepository';
export interface IPartnerRepository {
getAll(userId: string): Promise<PartnerEntity[]>;
get(partner: PartnerIds): Promise<PartnerEntity | null>;
create(partner: PartnerIds): Promise<PartnerEntity>;
remove(entity: PartnerEntity): Promise<void>;
}